You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tracing): Add extend app start API for standalone app start (#6392)
* feat(tracing): Add extend app start API for standalone app start (RN-675)
Add experimental `extendAppStart()`, `finishExtendedAppStart()`, and
`getExtendedAppStartSpan()` to keep the standalone `app.start` transaction open
past the auto-detected end so post-init work (remote config, session restore,
etc.) is included and can be broken down into child spans under an
`app.start.extended` span.
- `extendAppStart()` cancels the deferred auto-capture, holds the transaction
open, and starts a 30s deadline.
- `finishExtendedAppStart()` finalizes: trims the end to the last child (floored
at the default app start end) and sets the measurement at finalization.
- On the deadline the transaction is captured but the `app.vitals.start`
measurement is suppressed (never emit a ~30s app start).
- `attachAppStartToTransactionEvent` now takes `suppressMeasurement` and returns
whether it attached, so the finalize path decides send vs skip.
Standalone-only. `appLoaded()` stays as-is for now; its deprecation and removal,
plus making standalone the default, are handled together in RN-676 (v9).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Update changelog
* fix(tracing): Address extend app start review feedback (RN-675)
- extendAppStart(): claim the run only after confirming a recording span, so a
sampled-out/disabled run falls back to the normal capture path.
- Cap the 60s app start sanity check on the native window, not the extended end,
so a legitimately extended app start is not dropped.
- Thread the extended end explicitly instead of mutating shared appStartEndData,
so the extended end survives without wrap()/appLoaded().
- Guard app start attach with a run generation so a finish suspended at the
native-data await bails when a new runApplication run starts, instead of
corrupting the new run's state.
- finishExtendedAppStart() returns Promise<void> so callers can await before flush().
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(tracing): Re-check run generation after frames-delay await (RN-675)
The app start attach also awaits fetchNativeFramesDelay (~2s) after the first
generation check; a runApplication reset during that window could still send a
stale standalone transaction. Re-check the generation before reporting success.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(tracing): Trim extended app start to last child, not finish() time (RN-675)
- getLatestChildSpanEndTimestamp was computed on the root transaction, which
includes the extended (wrapper) span itself; since the wrapper ends at
finalization time, the transaction was pinned to the finishExtendedAppStart()
call rather than the last instrumented child. Compute the trim from the
wrapper's children (excluding the wrapper) on the explicit-finish path, end the
wrapper at that trimmed time so it never outlives the root, and keep the
full-window end on the deadline path. Floored at the default app start end and
the wrapper start.
- Regenerate the API report against @sentry/core 10.63.0 (restores the
deeplinkIntegration signature that a stale local build had reverted).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore: Merge main and move extend app start changelog entry to Unreleased
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@
8
8
9
9
## Unreleased
10
10
11
+
### Features
12
+
13
+
- Add experimental `extendAppStart`/`finishExtendedAppStart`/`getExtendedAppStartSpan` to extend the standalone app start window and instrument post-init work ([#6392](https://github.com/getsentry/sentry-react-native/pull/6392))
14
+
11
15
### Fixes
12
16
13
17
- Skip iOS source maps upload on `Debug` builds ([#6405](https://github.com/getsentry/sentry-react-native/pull/6405))
0 commit comments