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
fix(tracing): Address PR review on deep-link / navigation correlation
Addresses three findings from Cursor Bugbot and one from Sentry's review
bot on #6264:
* **Late deep link never tags span** (Cursor, medium). When Expo Router
auto-handles `Linking.getInitialURL()` and finishes the initial
navigation *before* our integration's own `getInitialURL().then(...)`
chain resolves, the URL was never attributed to the resulting span.
Fix: `pendingDeepLink` now supports a synchronous listener that the
navigation integration registers in `afterAllSetup`. When a link
arrives, the listener tags the in-flight (`latestNavigationSpan`) or
most-recent still-recording (`lastIdleNavSpan`) span directly. If
nothing live exists, the link falls through to the slot for the next
dispatched navigation. A WeakSet guards against double-tagging.
* **Same-route path skips deeplink retry** (Cursor, low). The early
return in `updateLatestNavigationSpanWithCurrentRoute` for matching
route keys (legitimate when deep-linking to the screen you're already
on) bypassed the attribution call. Fix: consume + tag in that branch
too, before the span reference is dropped.
* **Early consume loses pending link** (Cursor, medium). Consuming the
pending value inside `startIdleNavigationSpan` meant a later discard
(noop / timeout / empty route) silently wasted the link — the real
link-driven navigation that followed would not be attributed. Fix:
removed the eager consume on dispatch. Pending values are now only
consumed in `updateLatestNavigationSpanWithCurrentRoute` (post route
mount) or by the listener (live span). Discards never touch the slot.
* **`deeplink.received_at` semantically misleading** (Sentry, medium).
The attribute stored a duration but its `_at` suffix conventionally
denotes a timestamp. Renamed to `deeplink.dispatch_delay_ms`, which
accurately reflects the measured gap between URL receipt and span
annotation.
Plus: changelog entry now references PR #6264 (Danger gate).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
### Features
12
12
13
-
- Correlate deep links with the navigation transaction they trigger. The next idle navigation span started within `routeChangeTimeoutMs` of a deep link arrival is tagged with `navigation.trigger: 'deeplink'`, `deeplink.url` (sanitized, respects `sendDefaultPii`), and `deeplink.received_at` (ms gap between URL received and navigation dispatched). Covers both cold start (`Linking.getInitialURL()`) and warm open (`'url'` event) paths ([#6159](https://github.com/getsentry/sentry-react-native/issues/6159))
13
+
- Correlate deep links with the navigation transaction they trigger. The next idle navigation span started within `routeChangeTimeoutMs` of a deep link arrival is tagged with `navigation.trigger: 'deeplink'`, `deeplink.url` (sanitized, respects `sendDefaultPii`), and `deeplink.dispatch_delay_ms` (ms gap between URL received and navigation dispatched). Covers both cold start (`Linking.getInitialURL()`) and warm open (`'url'` event) paths, including the late-arrival case where Expo Router auto-handles the link before our `getInitialURL()` chain resolves ([#6264](https://github.com/getsentry/sentry-react-native/pull/6264))
14
14
- Add memory, CPU, and frame measurements to Android profiling ([#6250](https://github.com/getsentry/sentry-react-native/pull/6250))
15
15
- Add `enableAutoConsoleLogs` option to opt out of automatic `console.*` capture while keeping `enableLogs: true` for manual `Sentry.logger.*` calls ([#6235](https://github.com/getsentry/sentry-react-native/pull/6235))
16
16
- Instrument Expo Router `push`, `replace`, `navigate`, `back`, and `dismiss` (in addition to `prefetch`) with breadcrumbs and spans, and tag the resulting idle navigation span with the initiating `navigation.method` ([#6221](https://github.com/getsentry/sentry-react-native/pull/6221))
// src/js/feedback/integration.ts:21:5 - (ae-forgotten-export) The symbol "ScreenshotButtonProps" needs to be exported by the entry point index.d.ts
858
858
// src/js/feedback/integration.ts:23:5 - (ae-forgotten-export) The symbol "FeedbackFormTheme" needs to be exported by the entry point index.d.ts
859
859
// src/js/tracing/reactnativetracing.ts:90:3 - (ae-forgotten-export) The symbol "ReactNativeTracingState" needs to be exported by the entry point index.d.ts
860
-
// src/js/tracing/reactnavigation.ts:222:3 - (ae-forgotten-export) The symbol "RouteOverrideProvider" needs to be exported by the entry point index.d.ts
860
+
// src/js/tracing/reactnavigation.ts:224:3 - (ae-forgotten-export) The symbol "RouteOverrideProvider" needs to be exported by the entry point index.d.ts
861
861
862
862
// (No @packageDocumentation comment for this package)
0 commit comments