-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Make lifecycle breadcrumbs logged in fragments customizable (#1734) #2299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, besides some suggestions. Thank you a lot for doing that 👍
Also, please add a changelog entry, so the CI passes, you can look up at other PRs on how we do that
...ry-android-fragment/src/main/java/io/sentry/android/fragment/FragmentLifecycleIntegration.kt
Outdated
Show resolved
Hide resolved
...agment/src/main/java/io/sentry/android/fragment/internal/SentryFragmentLifecycleCallbacks.kt
Outdated
Show resolved
Hide resolved
We'd also have to update the documentation for the integration https://docs.sentry.io/platforms/android/configuration/integrations/fragment/, but we can take care of that if you don't have time. |
No problem, I missed it previously |
Codecov ReportBase: 80.21% // Head: 80.21% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #2299 +/- ##
=========================================
Coverage 80.21% 80.21%
Complexity 3475 3475
=========================================
Files 247 247
Lines 12906 12906
Branches 1735 1735
=========================================
Hits 10352 10352
Misses 1894 1894
Partials 660 660 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Do you need anything else from me about this PR? :) |
Nope, all good, just haven't had time to merge it. Will do so today. Thanks a lot for your contribution, appreciated 👍 |
📜 Description
Added a way for logging only a subset of a fragment lifecycle events through breadcrumbs.
💡 Motivation and Context
Issue: #1734
This change also introduces an API incompatibility for
SentryFragmentLifecycleCallbacks
. This is intentional: in my opinion, this class should have never been a part of public API. It is used only internally inFragmentLifecycleIntegration
, and I can't think of a reason to use it in a different way. Feel free to discuss if you disagree, I am open to reverting this and providing full API compatibility if it's really needed.💚 How did you test it?
Changed tests to include this new behavior.
📝 Checklist