Skip to content

feat(android): Set app start vitals on standalone app start children - #6005

Open
buenaflor wants to merge 6 commits into
mainfrom
cursor/96f09872
Open

feat(android): Set app start vitals on standalone app start children#6005
buenaflor wants to merge 6 commits into
mainfrom
cursor/96f09872

Conversation

@buenaflor

@buenaflor buenaflor commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Set app.vitals.start.type on the standalone app.start root, and copy app.vitals.start.screen + app.vitals.start.type onto all of its children — including user spans under app.start.extended. Headless starts omit screen. The ui.load-attached app start path is unchanged.

💡 Motivation and Context

Mobile vitals app start breakdown with app.start children with the root using these attributes. They were only on the root, so child spans did not group. Matches Flutter (getsentry/sentry-dart#3988).

Example of the sample app app start breakdown (previously empty without this PR):
image

Related to getsentry/sentry#122577

💚 How did you test it?

Unit tests in PerformanceAndroidEventProcessorTest (foreground, user descendants under app.start.extended, headless, ui.load non-propagation). Verified on sentry-samples-android (debug) that the envelope includes both attributes on the root, app.start.extended, and user children.

📝 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

Made with Cursor

buenaflor and others added 2 commits August 26, 2026 13:00
Copy app.vitals.start.screen and app.vitals.start.type onto every
span under standalone app.start, including user work under the
extended span, so they can be grouped with the root.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 26, 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 64015dd

@sentry

sentry Bot commented Aug 26, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@buenaflor buenaflor changed the title feat(android): Set app start vitals on standalone children feat(android): Set app start vitals on standalone app start children Aug 26, 2026
buenaflor and others added 2 commits August 26, 2026 13:30
@buenaflor
buenaflor marked this pull request as ready for review August 26, 2026 11:33
Copilot AI lite review requested due to automatic review settings August 26, 2026 11:33

Copilot AI 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.

Pull request overview

This PR updates the Android app start transaction processing so standalone app.start transactions consistently expose app.vitals.start.type on the transaction root and propagate app.vitals.start.screen + app.vitals.start.type to all child spans (including user spans under app.start.extended), while keeping the ui.load-attached app start behavior unchanged.

Changes:

  • Add app.vitals.start.type (APP_START_TYPE_DATA) and set it on standalone app start transaction roots.
  • Propagate app.vitals.start.type and (when present) app.vitals.start.screen from the standalone app start root to all child spans.
  • Add/extend unit tests covering foreground, headless, extended/user-span descendants, and non-propagation for ui.load-attached app start.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sentry-android-core/src/main/java/io/sentry/android/core/PerformanceAndroidEventProcessor.java Sets app.vitals.start.type on standalone app start roots and copies type/screen to child spans.
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java Introduces the APP_START_TYPE_DATA constant (app.vitals.start.type).
sentry-android-core/src/test/java/io/sentry/android/core/PerformanceAndroidEventProcessorTest.kt Adds test coverage for propagation behavior across standalone app start scenarios.
sentry-android-core/build.gradle.kts Adds Truth assertions dependency for new tests.
CHANGELOG.md Adds an Unreleased feature entry describing the new standalone app start attribute propagation.
Suppressed comments (1)

sentry-android-core/build.gradle.kts:122

  • libs.google.truth is declared twice in the test dependencies block, which is redundant and can cause confusion when scanning dependency lists. Keep a single declaration.
  testImplementation(libs.google.truth)
  testImplementation(libs.androidx.core.ktx)
  testImplementation(libs.androidx.test.core)
  testImplementation(libs.androidx.test.ext.junit)
  testImplementation(libs.androidx.test.runner)
  testImplementation(libs.awaitility.kotlin)
  testImplementation(libs.google.truth)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

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 d6b859a. Configure here.

Comment thread sentry-android-core/build.gradle.kts Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants