fix(tracing): Keep launch-screen TTID/TTFD anchored to navigation on delayed first navigation - #6626
Open
antonis wants to merge 2 commits into
Open
fix(tracing): Keep launch-screen TTID/TTFD anchored to navigation on delayed first navigation#6626antonis wants to merge 2 commits into
antonis wants to merge 2 commits into
Conversation
antonis
force-pushed
the
fix/launch-screen-ttid-delayed-navigation
branch
from
August 27, 2026 13:20
d0eaaeb to
6efdac3
Compare
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
…delayed first navigation For non-standalone app start tracking, attaching app start to the first navigation transaction re-anchored its start_timestamp to process init, which made auto time_to_initial_display/time_to_full_display absorb the uninstrumented gap before a delayed first navigation (splash / auth / loading). The later 30s TTID/TTFD cap then right-censored this into a large plateau. When the gap between app start end and the first navigation start exceeds 5s, report the app_start_cold/app_start_warm measurement but leave the screen TTID/TTFD anchored to the navigation start, so they measure the actual screen render. Genuine cold-start displays (first navigation follows app start promptly) keep the existing app-start-anchored behavior unchanged. Fixes #6618 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antonis
force-pushed
the
fix/launch-screen-ttid-delayed-navigation
branch
from
August 27, 2026 13:24
6efdac3 to
d94d843
Compare
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d94d843. Configure here.
📲 Install BuildsAndroid
|
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 64630e5+dirty | 3842.70 ms | 1218.11 ms | -2624.60 ms |
| b0d3373+dirty | 3831.75 ms | 1227.29 ms | -2604.46 ms |
| b04af96+dirty | 3818.92 ms | 1219.76 ms | -2599.16 ms |
| 3d31fcf+dirty | 3838.09 ms | 1223.46 ms | -2614.63 ms |
| a0a3177+dirty | 3844.73 ms | 1225.23 ms | -2619.51 ms |
| af33f3b+dirty | 3849.98 ms | 1236.45 ms | -2613.53 ms |
| 09a902f+dirty | 3835.67 ms | 1217.11 ms | -2618.57 ms |
| 5a316ea+dirty | 3820.11 ms | 1211.28 ms | -2608.83 ms |
| 403b9f3+dirty | 3832.18 ms | 1213.32 ms | -2618.87 ms |
| acd838e+dirty | 3849.78 ms | 1230.00 ms | -2619.78 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 64630e5+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| b0d3373+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| b04af96+dirty | 4.98 MiB | 6.54 MiB | 1.56 MiB |
| 3d31fcf+dirty | 4.98 MiB | 6.56 MiB | 1.58 MiB |
| a0a3177+dirty | 4.98 MiB | 6.55 MiB | 1.58 MiB |
| af33f3b+dirty | 4.98 MiB | 6.51 MiB | 1.54 MiB |
| 09a902f+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| 5a316ea+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 403b9f3+dirty | 5.08 MiB | 6.72 MiB | 1.64 MiB |
| acd838e+dirty | 5.15 MiB | 6.70 MiB | 1.55 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 44c8b3f+dirty | 492.13 ms | 563.47 ms | 71.34 ms |
| f6ce4ff+dirty | 484.92 ms | 507.50 ms | 22.58 ms |
| a858ac3+dirty | 498.50 ms | 575.22 ms | 76.72 ms |
| 822d35b+dirty | 472.69 ms | 561.24 ms | 88.56 ms |
| 5ca03f9+dirty | 412.83 ms | 459.40 ms | 46.57 ms |
| ef27341+dirty | 519.02 ms | 553.42 ms | 34.40 ms |
| 083e3ef+dirty | 456.74 ms | 508.20 ms | 51.46 ms |
| 2e64504+dirty | 488.33 ms | 541.31 ms | 52.98 ms |
| d038a14+dirty | 405.08 ms | 444.36 ms | 39.28 ms |
| 5b7e8a7+dirty | 601.58 ms | 634.98 ms | 33.40 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 44c8b3f+dirty | 48.30 MiB | 53.46 MiB | 5.15 MiB |
| f6ce4ff+dirty | 49.74 MiB | 55.45 MiB | 5.71 MiB |
| a858ac3+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| 822d35b+dirty | 49.74 MiB | 54.84 MiB | 5.10 MiB |
| 5ca03f9+dirty | 49.74 MiB | 55.26 MiB | 5.52 MiB |
| ef27341+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
| 083e3ef+dirty | 49.74 MiB | 55.36 MiB | 5.61 MiB |
| 2e64504+dirty | 49.74 MiB | 55.45 MiB | 5.71 MiB |
| d038a14+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 5b7e8a7+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3ce5254+dirty | 1217.70 ms | 1224.69 ms | 6.99 ms |
| 0b1b5e3+dirty | 3820.72 ms | 1207.94 ms | -2612.78 ms |
| 44abcc2+dirty | 3841.42 ms | 1214.77 ms | -2626.65 ms |
| 1d3572b+dirty | 3830.71 ms | 1222.23 ms | -2608.49 ms |
| 6177334+dirty | 3851.52 ms | 1226.23 ms | -2625.29 ms |
| 5ee78d6+dirty | 3815.71 ms | 1217.04 ms | -2598.67 ms |
| 083e3ef+dirty | 3871.96 ms | 1234.95 ms | -2637.01 ms |
| ce7b368+dirty | 3851.41 ms | 1222.37 ms | -2629.04 ms |
| 7887847+dirty | 3844.89 ms | 1221.67 ms | -2623.22 ms |
| 1122a96+dirty | 3839.17 ms | 1219.23 ms | -2619.93 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3ce5254+dirty | 3.38 MiB | 4.76 MiB | 1.38 MiB |
| 0b1b5e3+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| 44abcc2+dirty | 4.98 MiB | 6.55 MiB | 1.57 MiB |
| 1d3572b+dirty | 4.98 MiB | 6.56 MiB | 1.58 MiB |
| 6177334+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 5ee78d6+dirty | 5.15 MiB | 6.69 MiB | 1.53 MiB |
| 083e3ef+dirty | 4.98 MiB | 6.55 MiB | 1.57 MiB |
| ce7b368+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 7887847+dirty | 4.98 MiB | 6.46 MiB | 1.48 MiB |
| 1122a96+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f9c1ed4+dirty | 431.00 ms | 466.22 ms | 35.22 ms |
| c2e182c+dirty | 471.64 ms | 553.59 ms | 81.95 ms |
| 41d6254+dirty | 424.45 ms | 474.34 ms | 49.89 ms |
| af33f3b+dirty | 434.90 ms | 506.14 ms | 71.24 ms |
| 882f8ae+dirty | 399.98 ms | 427.06 ms | 27.08 ms |
| 0b5120f+dirty | 503.22 ms | 538.60 ms | 35.38 ms |
| 774257e+dirty | 407.09 ms | 447.46 ms | 40.37 ms |
| bf168a4+dirty | 418.21 ms | 489.74 ms | 71.53 ms |
| 5569641+dirty | 406.43 ms | 428.51 ms | 22.08 ms |
| c151573+dirty | 530.34 ms | 559.43 ms | 29.09 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f9c1ed4+dirty | 49.74 MiB | 54.86 MiB | 5.12 MiB |
| c2e182c+dirty | 49.74 MiB | 54.85 MiB | 5.11 MiB |
| 41d6254+dirty | 48.30 MiB | 53.60 MiB | 5.30 MiB |
| af33f3b+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 882f8ae+dirty | 48.30 MiB | 53.60 MiB | 5.29 MiB |
| 0b5120f+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 774257e+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| bf168a4+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 5569641+dirty | 48.30 MiB | 53.48 MiB | 5.18 MiB |
| c151573+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
antonis
marked this pull request as ready for review
August 27, 2026 14:29
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.
📢 Type of change
📜 Description
On non-standalone app start tracking, attaching app start to the first navigation transaction rewrites its
start_timestampto process init and re-anchors the TTID/TTFD spans to it;timeToDisplay(which runs after) then derivestime_to_initial_display/time_to_full_displayfrom that rewritten start.On a delayed first navigation — a splash / auth / loading screen held for several seconds — this makes TTID/TTFD span the uninstrumented app-ready → navigation gap instead of the screen render, inflating them by an order of magnitude (e.g. ~0.9s → ~23s in #6618; the 30s cap from #6210 flattens the overflow into a plateau).
This adds a gap check: when
first navigation start − app start end > 5s, the SDK still reports theapp_start_cold/app_start_warmmeasurement but leavesstart_timestamp(and therefore TTID/TTFD) at the navigation start, so they measure the real render. Prompt cold-start displays (gap ≤ 5s) are unchanged. Scoped to non-standalone, non-__DEV__, and runs after the existing age/duration guards.The
5scutoff is a heuristic; a root-cause fix would use a native initial-display signal instead of elapsed time (see Next steps).💡 Motivation and Context
React Native decouples JS navigation from native app start, so the first
navigationtransaction can fire arbitrarily late. The TTID/TTFD spec anchors first-screen TTID to app start with no gap guard, because on native the first Activity is the app start — they can't be seconds apart. On RN they can, producing a gap the spec never contemplated.Fixes #6618
💚 How did you test it?
appStart.test.ts: delayed nav keepsstart_timestampat the navigation start and adds noCold Start/Warm Startspan while still reportingapp_start_cold/warm; prompt nav (< 5s) keeps the existing app-start-anchored behavior; dev build skips the branch.appStart.test.ts(94 passing, incl. snapshots) andtimeToDisplayIntegration.test.tspass;yarn build, TS/JS lint, circular-dep check, andapi-report:checkall clean (no public API change).📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps