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 reportFullyDisplayed() static API (#6419)
* feat(tracing): Add `reportFullyDisplayed()` static API
Add imperative `Sentry.reportFullyDisplayed()` API for signaling Time to
Full Display, matching the cross-SDK spec at develop.sentry.dev. This is
the imperative equivalent of the `<TimeToFullDisplay>` component.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: Add changelog entry for reportFullyDisplayed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Route reportFullyDisplayed through the integration
Store the timestamp in a JS-side map and let the timeToDisplayIntegration
pick it up during processEvent, instead of calling updateFullDisplaySpan
directly. The previous approach failed in production because it relied on
updateInitialDisplaySpan to drain the deferred queue, but that function
is never called in the real component/navigation flow — TTID timestamps
are read from native during processEvent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Use root span ID for imperative TTFD and guard duplicate spans
- Use `getRootSpan` in `reportFullyDisplayed()` so the stored key matches the
integration's `rootSpanId` lookup, even when called inside a nested child span.
- Add early return in `addTimeToFullDisplay` when an existing ok TTFD span is
found, preventing duplicate `ui.load.full_display` spans.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Always pop imperative TTFD timestamp to prevent leak
Pop both native and imperative timestamps unconditionally so the
imperative entry is cleaned up even when native takes priority.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Use timestampInSeconds and cap imperative TTFD map size
- Use `timestampInSeconds()` instead of `Date.now() / 1000` for clock
consistency with the rest of the tracing module.
- Cap `_imperativeTtfdTimestamps` at 50 entries, evicting the oldest
when full, to prevent unbounded growth on sampled-out transactions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update changelog
* fix(tracing): Add timestamp guard to TTFD early-return, matching TTID pattern
Only return existing ok/unfinished TTFD span when no new timestamp is
available, so an imperative timestamp can still update an unfinished span.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Restructure TTFD flow to eliminate dead code in existing-span guard
Split the combined `!ttidSpan || !ttfdEndTimestampSeconds` check so the
existing ok TTFD span guard runs between them, matching the TTID pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Update existing TTFD span when both component and imperative API are used
Broadens the existing-span update condition to handle spans with
undefined or ok status, preventing duplicate ui.load.full_display spans
when <TimeToFullDisplay> and reportFullyDisplayed() are both used.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tracing): Fix existing-span update for both TTID and TTFD, add combined-use test
Broaden the TTID existing-span update condition to match the TTFD fix,
preventing duplicate spans when a component span with ok/undefined
status exists alongside a native timestamp. Add test for combined
<TimeToFullDisplay> component + reportFullyDisplayed() usage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,12 @@
6
6
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
7
7
<!-- prettier-ignore-end -->
8
8
9
+
## Unreleased
10
+
11
+
### Features
12
+
13
+
- Add `Sentry.reportFullyDisplayed()` imperative API for signaling Time to Full Display ([#6419](https://github.com/getsentry/sentry-react-native/pull/6419))
0 commit comments