feat(tracing): Wrap Expo Router push, replace, navigate, back, dismiss in addition to prefetch
#6221
@sentry/warden / warden: code-review
completed
Jun 2, 2026 in 6m 6s
1 issue
code-review: Found 1 issue (1 medium)
Medium
Stale `pendingExpoRouterNavigation` can incorrectly tag unrelated React Navigation spans - `packages/core/src/js/tracing/reactnavigation.ts:455-458`
If router.back() or router.dismiss() is called when there is nothing to navigate back to (a silent no-op โ no exception, no React Navigation state change), consumePendingExpoRouterNavigation() is never called, so the pending value stays set and will be consumed by the next unrelated navigation, tagging its span with the wrong navigation.method.
โฑ 5m 58s ยท 737.2k in / 58.0k out ยท $1.83
Annotations
Check warning on line 458 in packages/core/src/js/tracing/reactnavigation.ts
sentry-warden / warden: code-review
Stale `pendingExpoRouterNavigation` can incorrectly tag unrelated React Navigation spans
If `router.back()` or `router.dismiss()` is called when there is nothing to navigate back to (a silent no-op โ no exception, no React Navigation state change), `consumePendingExpoRouterNavigation()` is never called, so the pending value stays set and will be consumed by the next unrelated navigation, tagging its span with the wrong `navigation.method`.
Loading