feat: Added enableTraceIdGeneration option#4188
Merged
bitsandfoxes merged 12 commits intomainfrom Feb 24, 2025
Merged
Conversation
Contributor
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b68b2b0 | 337.22 ms | 428.22 ms | 91.00 ms |
| b35d87a | 404.45 ms | 405.02 ms | 0.57 ms |
| f864475 | 415.13 ms | 478.10 ms | 62.97 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b68b2b0 | 1.58 MiB | 2.21 MiB | 641.57 KiB |
| b35d87a | 1.58 MiB | 2.21 MiB | 641.30 KiB |
| f864475 | 1.58 MiB | 2.21 MiB | 641.28 KiB |
fc43927 to
d0f9805
Compare
e8ba360 to
ac7be23
Compare
b4f9292 to
46039a5
Compare
romtsn
reviewed
Feb 24, 2025
sentry-android-core/src/main/java/io/sentry/android/core/ManifestMetadataReader.java
Outdated
Show resolved
Hide resolved
romtsn
approved these changes
Feb 24, 2025
Member
romtsn
left a comment
There was a problem hiding this comment.
LGTM, I only have one concern about hybrid-mixed apps (e.g. UaaL or a RN bundle for some screens within a regular android app): this would disable it for the entire run of a process, so it's either-or and not that you can have mixed traces, but I'm not sure if we should think/support this already now.
Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
Contributor
|
The support for hybrid-mixed apps is not clearly defined at the moment. But a simple answer is the mixed app initializes native (Android) manually thus the user should enable |
Contributor
Author
The main use-case is Hybrid SDKs controlling the generation. And it's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
This PR adds a
enableTraceIdGenerationoption to theAndroidOptions. This option is then used in theActiviytLifeCycleIntegrationand theSentryGestureListenerto control whether the SDK generates a new trace.💡 Motivation and Context
The idea is that Hybrid SDK should control trace generation. For that they need a way to disable the automatic trace creation in the Java SDK. This is so we can ensure that a single trace ID manages the entire lifecycle of a game/app, linking errors and events top-down.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps