Repository navigation
fix(android): Start a warm app start from onActivityPreCreated on API 29+ - #6719
Merged
Merged
Conversation
… 29+ The activity.load span starts in onActivityPreCreated, so a warm app.start transaction anchored at onActivityCreated started after its own first child. On API 29+ the first-activity logic now runs in onActivityPreCreated; older versions keep onActivityCreated, since pre-created callbacks don't exist there. Fixes JAVA-850 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR risk: mediumFor commit Main concerns: public contract, reach, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
runningcode
marked this pull request as ready for review
November 20, 2026 16:40
runningcode
requested review from
0xadam-brown and
romtsn
and removed request for
a team
November 20, 2026 16:40
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33c9028. Configure here.
romtsn
approved these changes
Nov 23, 2026
romtsn
left a comment
Contributor
There was a problem hiding this comment.
I'd fix the bugbot finding, but LGTM otherwise, pre-approving!
…PreCreated was missed
3 tasks done
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
On API 29+,
AppStartMetricsnow decides the app start type and restarts the warm app start span inonActivityPreCreated. Below API 29, where that callback doesn't exist, it keeps doing this inonActivityCreated.💡 Motivation and Context
ActivityLifecycleIntegrationalready starts theactivity.loadspan inonActivityPreCreated. A warmapp.starttransaction anchored atonActivityCreatedtherefore started after its own first child. This was raised in review of #6687.💚 How did you test it?
Unit tests.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code