-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Provide default fragment breadcrumb implementation #1374
Comments
@VladyslavKasprov thanks for raising this issue, yes, we're aware of that, the main reason is, there's no global hook that we can access and add our lifecycle callback automatically, you'd need to do it manually for each 2nd reason is that we'd need to depend on |
Separate dependency and manual hooking would be fine) Thank you) Is there a sample implementation that we can use in the meantime? |
@VladyslavKasprov yes, take a look at the Activity lifecycle for inspiration https://github.com/getsentry/sentry-java/blob/main/sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java if you wish to contribute with a PR, happy to guide :) ideally creating a new Gradle module etc |
👋 @marandaneto I'm working currently on a My concern is that The challenge I see here is how to add My question is: is there any way to add |
@wzieba hey, thanks for your feedback.
A way to see this is using the Maybe installing a new this would likely require a new package as the SDK does not depend on the fragments package, like you also probably need to set up your SDK in manual mode https://docs.sentry.io/platforms/android/configuration/manual-init. as you need to add your new You'd also need to think about Every Activity has a different instance of does that help? let me know if its not clear :) thanks for working on it btw. |
the other option is just to offer the A more risky one is adding bytecode manipulation via Gradle plugin :D |
Having an option to manually hook up the listener would be good enough. Its fine since most applications these days have very few activities. And even if you have many it's not a big deal. |
Hi. We use a lot of fragments in our Android application, but we don't get any breadcrumbs for them. Is it possible to add default implementation for collecting fragment breadcrumbs?
P.S. From what I know, we'll have to manually set it in each activity using FragmentManager#registeeFragmenrLifecycleCallbacks.
The text was updated successfully, but these errors were encountered: