feat(compose): Introduce LocalSentrySpan - #6112
Open
0xadam-brown wants to merge 1 commit into
Open
0xadam-brown wants to merge 1 commit into
0xadam-brown wants to merge 1 commit into
Conversation
0xadam-brown
force-pushed
the
feat/local-sentry-span
branch
from
September 14, 2026 15:10
633936e to
6a2930f
Compare
Contributor
|
📲 Install BuildsAndroid
|
9 tasks
0xadam-brown
marked this pull request as ready for review
September 15, 2026 06:19
0xadam-brown
requested review from
adinauer,
markushi,
romtsn and
runningcode
as code owners
September 15, 2026 06:19
Commit defines a LocalSentrySpan that lets Sentry and host apps deliver ISpan instances throughout composable subtrees. The delivered span can be used to parent any spans the receiving subtree produces, thereby freeing child composables from having to care about the ISpan hierarchies constructed by their ancestors. Commit also contains an internal UnsetSentrySpan + bootstrapping system that lets existing Sentry composable infrastructure provide its own ISpan in situations where the environment doesn't set a LocalSentrySpan. Commit updates SentryTraced to use both LocalSentrySpan and the bootstrapping system. Co-authored-by: Tabish Ahmad <tabishahmad1@gmail.com>
0xadam-brown
force-pushed
the
feat/local-sentry-span
branch
from
September 15, 2026 06:39
6a2930f to
5105821
Compare
Member
Author
|
Updating the commit message; otherwise unchanged. |
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
Defines a
LocalSentrySpanthat lets Sentry and host apps deliver ISpan instances throughout composable subtrees. The delivered span can then be used to parent any spans the receiving subtree produces.I've also introduced an internal
UnsetSentrySpan+ bootstrapping system that lets existing Sentry composable infrastructure provide its own ISpan in situations where the environment doesn't set a LocalSentrySpan.SentryTracedhas been updated to use both LocalSentrySpan and the bootstrapping system.💡 Motivation and Context
Frees child composables from having to care about the ISpan hierarchies constructed by their ancestors, which is an anti-pattern we'd rather discourage.
This PR is an alternative to the IScopes-based approach proposed in #5838.
💚 How did you test it?
Unit tests + manual testing via the relevant Android sample apps.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps