FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(compose): Introduce LocalSentrySpan by 0xadam-brown · Pull Request #6112 · getsentry/sentry-java · GitHub

feat(compose): Introduce LocalSentrySpan - #6112

Merged
0xadam-brown merged 3 commits into
mainfrom
feat/local-sentry-span
Sep 18, 2026
Merged

0xadam-brown merged 3 commits into
mainfrom
feat/local-sentry-span

Conversation

0xadam-brown commented Sep 14, 2026
edited
Loading

Copy link
Copy Markdown
Member

📜 Description

Defines a LocalSentrySpan that 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.

PR also introduces 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.

SentryTraced has 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.

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

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

github-actions Bot commented Sep 14, 2026
edited
Loading

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 15ec991

sentry Bot commented Sep 14, 2026
edited
Loading

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.57.0 (1) release

⚙️ sentry-android Build Distribution Settings

0xadam-brown added the deep-dive PR needs a thorough review of design, behavior, and edge cases label Sep 15, 2026
0xadam-brown marked this pull request as ready for review September 15, 2026 06:19

Copy link
Copy Markdown
Member Author

Updating the commit message; otherwise unchanged.

Copy link
Copy Markdown
Member Author

Rebased on an updated target; otherwise unchanged.

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>

markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice one!

0xadam-brown merged commit 9fd9105 into main Sep 18, 2026
71 checks passed
0xadam-brown deleted the feat/local-sentry-span branch September 18, 2026 13:40
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

Labels

deep-dive PR needs a thorough review of design, behavior, and edge cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL