Skip to content

feat(android): Enable standalone app start tracing by default - #6716

Merged
runningcode merged 6 commits into
9.x.xfrom
no/java-503-standalone-app-start-default
Nov 24, 2026
Merged

runningcode merged 6 commits into
9.x.xfrom
no/java-503-standalone-app-start-default

Conversation

@runningcode

@runningcode runningcode commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Turn on standalone app start tracing by default in 9.0.

That means the app start is now sent as its own App Start transaction (app.start) instead of an app.start.* child span of the first ui.load transaction.

The option and the io.sentry.standalone-app-start-tracing.enable manifest key stay, so apps can opt out with false. The option is no longer @ApiStatus.Experimental.

Things worth a look:

  • UI tests run with the new default.
  • Hybrid SDKs: React Native, Flutter and Capacitor don't enable native tracing on Android, so this is a no-op for them. .NET MAUI does when Native.EnableTracing is 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 the sentry-uitest-android suite on an emulator.

📝 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

Update the Android tracing docs, which still describe the option as opt-in, when 9.0 ships.

🤖 Generated with Claude Code

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>
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

JAVA-503

@github-actions

github-actions Bot commented Nov 20, 2026 •

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 23ad47f

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 23ad47f.

Main concerns: data sent to Sentry, public contract, reach.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review November 20, 2026 15:31
@runningcode
runningcode requested review from a team and adinauer as code owners November 20, 2026 15:31
@runningcode
runningcode requested review from 0xadam-brown and romtsn and removed request for a team November 20, 2026 15:31
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

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>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ 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.

Comment thread CHANGELOG.md Resolved

@romtsn romtsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: medium PR risk score: medium labels Nov 23, 2026
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>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: high PR risk score: high labels Nov 23, 2026
…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>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 23, 2026
@runningcode
runningcode merged commit 7178358 into 9.x.x Nov 24, 2026
40 of 41 checks passed
@runningcode
runningcode deleted the no/java-503-standalone-app-start-default branch November 24, 2026 07:46
sentry-junior Bot added a commit that referenced this pull request Nov 24, 2026
9.x.x enables standalone app start tracing by default (#6716), so the test from #6599 that reads sut.appStartSpan must turn it off, like the other tests that assert on the app start child span.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants