Repository navigation
feat(android): Enable standalone app start tracing by default - #6716
Conversation
App start is now sent as its own App Start transaction instead of an app.start.* child span of the first ui.load transaction. The option and its manifest key stay so apps can opt out, and the option is no longer experimental. AppStartMetrics.clear() now also drops the extend-app-start listener, which otherwise leaks from one ActivityLifecycleIntegrationTest into the next now that most tests register it. Fixes JAVA-503 Fixes #5376 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PR risk: mediumFor commit Main concerns: data sent to Sentry, public contract, reach. This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
Instead of turning the new default off for all UI tests, MockRelay keeps app start transactions apart. They don't count as expected requests and don't use up custom responses, since whether a headless app start is sent depends on the process importance. Tests that launch an Activity assert exactly one app start transaction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a151e1b. Configure here.
romtsn
left a comment
There was a problem hiding this comment.
Gotta fix tests (the failing AGP matrix) + one changelog entry suggestion, but otherwise looks good, pre-approving. I haven't checked the bugbot suggestions and if they're pointing at the failing tests, but perhaps they might need addressing too.
Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
doubleInitDoesNotWait: the second init sends a headless app start from a main thread IdleHandler, which could take the transaction profiler from the afterRestart transaction. Wait for the main thread to be idle first. checkAppStartFramesMeasurements: the app start is sent right after init, while SendCachedEnvelopeIntegration scans the disk cache, so the same envelope can arrive twice. Deduplicate app starts by event ID, as MockRelay already does for other envelopes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng is dropped The headless app start sent after the second init can take the transaction profiler from the afterRestart transaction. Transaction-based profiling is being dropped in #5094, so ignore the test until then instead of working around it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

📜 Description
Turn on standalone app start tracing by default in 9.0.
That means the app start is now sent as its own
App Starttransaction (app.start) instead of anapp.start.*child span of the firstui.loadtransaction.The option and the
io.sentry.standalone-app-start-tracing.enablemanifest key stay, so apps can opt out withfalse. The option is no longer@ApiStatus.Experimental.Things worth a look:
Native.EnableTracingis on (off by default), and then its apps get the standalone transaction too.💡 Motivation and Context
💚 How did you test it?
Unit tests in
sentry-android-core, and thesentry-uitest-androidsuite on an emulator.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Update the Android tracing docs, which still describe the option as opt-in, when 9.0 ships.
🤖 Generated with Claude Code