Skip to content

Commit 15d4514

Browse files
authored
feat(tracing): Wrap Expo Router push, replace, navigate, back, dismiss in addition to prefetch (#6221)
* Wrap push, replace, navigate, back, dismiss in addition to prefetch * fix(tracing): Guard Expo Router navigation breadcrumbs and spans behind sendDefaultPii Expo Router `push`/`replace`/`navigate`/`back`/`dismiss` (and `prefetch`) wrappers previously emitted the raw `href` and route `params` on both the navigation breadcrumb and span attributes regardless of the client options. Dynamic segments like `/users/123` and parameter values such as `{ id: '123' }` can carry user identifiers and other PII, so the existing `reactnavigation.ts` integration already gates them behind `sendDefaultPii`. The new Expo Router wrappers should follow the same contract. This change: - Reads `sendDefaultPii` from the client options and only attaches `href` (raw string or stringified object form) and `params` to the breadcrumb `data` and span attributes when it is enabled. - Keeps the non-PII fields — `method`, `pathname` (route template), and `route.name` — unconditional so navigations remain visible and groupable in Sentry without leaking user data. - Applies the same guard to the `prefetch` span's `route.href` attribute, which was newly added in this PR. - Adds dedicated `sendDefaultPii` test cases and updates the existing default-off assertions for all wrapped methods. - Adds a changelog entry for #6221. * Fixes * Changelog fix * test(tracing): Cover pendingExpoRouterNavigation hand-off in reactNavigationIntegration The Expo Router wrapper sets a pending navigation value that the React Navigation idle-span listener is supposed to consume and apply to the resulting transaction as the `navigation.method` attribute. Previously only the setter side (in expoRouter.test.ts) was tested; the consumer side had no coverage, so a regression in reactnavigation.ts would have gone undetected. Add three integration-level tests against the live reactNavigationIntegration: - the next navigation transaction is tagged with `navigation.method` matching the pending Expo Router call - the pending value is consumed exactly once and does not leak into the following navigation - no `navigation.method` attribute is set when nothing is pending Surfaced by Warden review (4UA-DHD). * fix(tracing): Drain pendingExpoRouterNavigation even when the idle-span listener short-circuits `startIdleNavigationSpan` has several early-return paths (dispatched noops, PRELOAD with prefetch tracking, SET_PARAMS, drawer actions, and `useDispatchedActionData` calls without a route name in the payload). Previously `consumePendingExpoRouterNavigation()` lived after those returns, so a wrapped Expo Router call that ended up taking one of the short-circuit paths left its pending value in the module-level slot. The next, unrelated navigation then incorrectly inherited the wrong `navigation.method` attribute. Move the `consumePendingExpoRouterNavigation()` call to the very top of the listener so the value is always drained on the listener invocation triggered by the wrapper. Apply it to the span only if we actually create one. Add a regression test covering the dispatched-action-without-payload early-return path; the test fails on the previous code and passes with the fix. Surfaced by sentry-bot and cursor-bot reviews. * fix(tracing): Use spec-compliant `auto.navigation.expo_router` origin Per the Sentry trace-origin spec (https://develop.sentry.dev/sdk/telemetry/traces/trace-origin/), the `sentry.origin` value uses the format `type.category.integration-name`, where `category` is a span operation category such as `navigation`. The new origin for wrapped Expo Router push/replace/navigate/back/dismiss calls was `auto.expo_router.navigation`, which swaps the category and integration name. Align it with the existing `auto.navigation.react_navigation` and `auto.navigation.react_native_navigation` constants so server-side filtering and downstream tools recognize these as navigation spans. The pre-existing `auto.expo_router.prefetch` origin has the same inverted ordering but is left unchanged here \u2014 it is already shipped and changing it would break consumers that filter by it. Surfaced by cursor-bot review. * docs(changelog): Note Expo Router prefetch PII-gating behavior change The PR also tightened PII handling for the pre-existing `prefetch` instrumentation: when `sendDefaultPii` is off (the default), `route.href` is dropped and concrete pathnames derived from string hrefs (e.g. `/users/42`) are replaced with `'unknown'` for `route.name`. Templated object hrefs are unaffected. Document this so users with dashboards or alerts filtering on prefetch `route.name`/`route.href` notice the change. Surfaced by cursor-bot review. * refactor(tracing): Drop unused fields from PendingExpoRouterNavigation The consumer in `reactnavigation.ts` only reads `.method`; the `href`, `pathname`, and `params` fields were populated by `wrapExpoRouter` but never used. Remove them from the interface and the setter call so the type accurately reflects what the hand-off actually carries. Surfaced by code review (antonis).
1 parent bb85cf7 commit 15d4514

8 files changed

Lines changed: 612 additions & 58 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
- Add memory, CPU, and frame measurements to Android profiling ([#6250](https://github.com/getsentry/sentry-react-native/pull/6250))
1414
- 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))
15+
- 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))
16+
- Note: Expo Router span/breadcrumb attributes that may contain user identifiers (`route.href`, `route.params`, and concrete pathnames derived from string hrefs such as `/users/42`) are now gated behind `sendDefaultPii`. When `sendDefaultPii` is off (the default), prefetch spans for string hrefs use `route.name: 'unknown'` and omit `route.href`. Templated object hrefs (e.g. `{ pathname: '/users/[id]' }`) are unaffected.
1517
- Warn when Gradle resolves `sentry-android` to a version incompatible with the SDK ([#6238](https://github.com/getsentry/sentry-react-native/pull/6238))
1618

1719
### Fixes

packages/core/etc/sentry-react-native.api.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,13 @@ export interface ExpoRouter {
272272
// (undocumented)
273273
back?: () => void;
274274
// (undocumented)
275+
dismiss?: (count?: number) => void;
276+
// (undocumented)
275277
navigate?: (...args: unknown[]) => void;
278+
// Warning: (ae-forgotten-export) The symbol "ExpoRouterHref" needs to be exported by the entry point index.d.ts
279+
//
276280
// (undocumented)
277-
prefetch?: (href: string | {
278-
pathname?: string;
279-
params?: Record<string, unknown>;
280-
}) => void | Promise<void>;
281+
prefetch?: (href: ExpoRouterHref) => void | Promise<void>;
281282
// (undocumented)
282283
push?: (...args: unknown[]) => void;
283284
// (undocumented)
@@ -856,7 +857,7 @@ export function wrapExpoRouter<T extends ExpoRouter>(router: T): T;
856857
// src/js/feedback/integration.ts:21:5 - (ae-forgotten-export) The symbol "ScreenshotButtonProps" needs to be exported by the entry point index.d.ts
857858
// src/js/feedback/integration.ts:23:5 - (ae-forgotten-export) The symbol "FeedbackFormTheme" needs to be exported by the entry point index.d.ts
858859
// src/js/tracing/reactnativetracing.ts:90:3 - (ae-forgotten-export) The symbol "ReactNativeTracingState" needs to be exported by the entry point index.d.ts
859-
// src/js/tracing/reactnavigation.ts:219:3 - (ae-forgotten-export) The symbol "RouteOverrideProvider" needs to be exported by the entry point index.d.ts
860+
// src/js/tracing/reactnavigation.ts:220:3 - (ae-forgotten-export) The symbol "RouteOverrideProvider" needs to be exported by the entry point index.d.ts
860861

861862
// (No @packageDocumentation comment for this package)
862863

Lines changed: 187 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,118 @@
1-
import { SPAN_STATUS_ERROR, SPAN_STATUS_OK, startInactiveSpan } from '@sentry/core';
1+
import { addBreadcrumb, getClient, SPAN_STATUS_ERROR, SPAN_STATUS_OK, startInactiveSpan } from '@sentry/core';
22

3-
import { SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH } from './origin';
3+
import { SPAN_ORIGIN_AUTO_EXPO_ROUTER_NAVIGATION, SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH } from './origin';
4+
import { clearPendingExpoRouterNavigation, setPendingExpoRouterNavigation } from './pendingExpoRouterNavigation';
5+
6+
type ExpoRouterHref = string | { pathname?: string; params?: Record<string, unknown> };
47

58
/**
6-
* Type definition for Expo Router's router object
9+
* Type definition for Expo Router's router object.
710
*/
811
export interface ExpoRouter {
9-
prefetch?: (href: string | { pathname?: string; params?: Record<string, unknown> }) => void | Promise<void>;
10-
// Other router methods can be added here if needed
12+
prefetch?: (href: ExpoRouterHref) => void | Promise<void>;
1113
push?: (...args: unknown[]) => void;
1214
replace?: (...args: unknown[]) => void;
13-
back?: () => void;
1415
navigate?: (...args: unknown[]) => void;
16+
back?: () => void;
17+
dismiss?: (count?: number) => void;
18+
}
19+
20+
type NavigationMethod = 'push' | 'replace' | 'navigate' | 'back' | 'dismiss';
21+
22+
interface ParsedHref {
23+
href?: unknown;
24+
/** A label used for span/transaction naming. May be PII when {@link concretePathname} is true. */
25+
routeName: string;
26+
/** Pathname extracted from the href, if any. May be PII when {@link concretePathname} is true. */
27+
pathname?: string;
28+
params?: Record<string, unknown>;
29+
/**
30+
* Whether `pathname` / `routeName` came from a concrete string href (e.g. `/users/42`)
31+
* rather than a templated object href (e.g. `{ pathname: '/users/[id]' }`).
32+
*
33+
* Concrete pathnames can contain user identifiers and must be gated behind
34+
* `sendDefaultPii`. Templated pathnames are structural and safe.
35+
*/
36+
concretePathname: boolean;
1537
}
1638

1739
/**
18-
* Wraps Expo Router. It currently only does one thing: extends prefetch() method
19-
* to add automated performance monitoring.
40+
* Wraps Expo Router methods to add automated performance monitoring and breadcrumbs.
41+
*
42+
* Currently wraps:
43+
* - `prefetch` — wraps the call in a `navigation.prefetch` span.
44+
* - `push` / `replace` / `navigate` / `back` / `dismiss` — adds a navigation
45+
* breadcrumb, wraps the call in a short-lived span that mirrors prefetch's
46+
* error/status handling, and tags the subsequent idle navigation transaction
47+
* with the initiating `navigation.method` so the resulting span can be
48+
* attributed back to the call site.
2049
*
21-
* This function instruments the `prefetch` method of an Expo Router instance
22-
* to create performance spans that measure how long route prefetching takes.
50+
* Safe to call repeatedly — guarded by a single `__sentryWrapped` flag.
2351
*
2452
* @param router - The Expo Router instance from `useRouter()` hook
25-
* @returns The same router instance with an instrumented prefetch method
53+
* @returns The same router instance with instrumented methods
2654
*/
2755
export function wrapExpoRouter<T extends ExpoRouter>(router: T): T {
28-
if (!router?.prefetch) {
56+
if (!router) {
2957
return router;
3058
}
3159

32-
// Check if already wrapped to avoid double-wrapping
33-
if ((router as T & { __sentryPrefetchWrapped?: boolean }).__sentryPrefetchWrapped) {
60+
const wrappedRouter = router as T & { __sentryWrapped?: boolean };
61+
if (wrappedRouter.__sentryWrapped) {
3462
return router;
3563
}
3664

37-
const originalPrefetch = router.prefetch.bind(router);
65+
if (router.prefetch) {
66+
wrapPrefetch(router);
67+
}
3868

39-
router.prefetch = ((href: Parameters<NonNullable<ExpoRouter['prefetch']>>[0]) => {
40-
// Extract route name from href for better span naming
41-
let routeName = 'unknown';
42-
if (typeof href === 'string') {
43-
routeName = href;
44-
} else if (href && typeof href === 'object' && 'pathname' in href && href.pathname) {
45-
routeName = href.pathname;
46-
}
69+
if (router.push) {
70+
router.push = wrapNavigationMethod(router, 'push', router.push.bind(router));
71+
}
72+
if (router.replace) {
73+
router.replace = wrapNavigationMethod(router, 'replace', router.replace.bind(router));
74+
}
75+
if (router.navigate) {
76+
router.navigate = wrapNavigationMethod(router, 'navigate', router.navigate.bind(router));
77+
}
78+
if (router.back) {
79+
router.back = wrapNavigationMethod(router, 'back', router.back.bind(router)) as NonNullable<T['back']>;
80+
}
81+
if (router.dismiss) {
82+
const originalDismiss = router.dismiss.bind(router) as (...args: unknown[]) => unknown;
83+
router.dismiss = wrapNavigationMethod(router, 'dismiss', originalDismiss) as NonNullable<T['dismiss']>;
84+
}
85+
86+
wrappedRouter.__sentryWrapped = true;
87+
return router;
88+
}
89+
90+
function wrapPrefetch<T extends ExpoRouter>(router: T): void {
91+
const originalPrefetch = router.prefetch!.bind(router);
92+
93+
router.prefetch = ((href: ExpoRouterHref) => {
94+
const parsed = parseHref(href);
95+
const sendPii = isSendDefaultPiiEnabled();
96+
// For concrete string hrefs (e.g. `/users/42`), `routeName` may carry
97+
// user identifiers — gate it behind `sendDefaultPii`. For templated
98+
// object hrefs (e.g. `{ pathname: '/users/[id]' }`) it is structural.
99+
const safeRouteName = parsed.concretePathname && !sendPii ? 'unknown' : parsed.routeName;
47100

48101
const span = startInactiveSpan({
49102
op: 'navigation.prefetch',
50-
name: `Prefetch ${routeName}`,
103+
name: `Prefetch ${safeRouteName}`,
51104
attributes: {
52105
'sentry.origin': SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH,
53-
'route.href': typeof href === 'string' ? href : JSON.stringify(href),
54-
'route.name': routeName,
106+
'route.name': safeRouteName,
107+
// `route.href` may contain dynamic segment values (e.g. `/users/42`)
108+
// or stringified `params`, so it is gated behind `sendDefaultPii`.
109+
...(sendPii ? { 'route.href': serializeHref(href) } : undefined),
55110
},
56111
});
57112

58113
try {
59114
const result = originalPrefetch(href);
60115

61-
// Handle both promise and synchronous returns
62116
if (result && typeof result === 'object' && 'then' in result && typeof result.then === 'function') {
63117
return result
64118
.then(res => {
@@ -71,21 +125,119 @@ export function wrapExpoRouter<T extends ExpoRouter>(router: T): T {
71125
span?.end();
72126
throw error;
73127
});
74-
} else {
75-
// Synchronous completion
76-
span?.setStatus({ code: SPAN_STATUS_OK });
77-
span?.end();
78-
return result;
79128
}
129+
130+
span?.setStatus({ code: SPAN_STATUS_OK });
131+
span?.end();
132+
return result;
80133
} catch (error) {
81134
span?.setStatus({ code: SPAN_STATUS_ERROR, message: String(error) });
82135
span?.end();
83136
throw error;
84137
}
85138
}) as NonNullable<T['prefetch']>;
139+
}
86140

87-
// Mark as wrapped to prevent double-wrapping
88-
(router as T & { __sentryPrefetchWrapped?: boolean }).__sentryPrefetchWrapped = true;
141+
function wrapNavigationMethod(
142+
router: ExpoRouter,
143+
method: NavigationMethod,
144+
original: (...args: unknown[]) => unknown,
145+
): (...args: unknown[]) => unknown {
146+
return (...args: unknown[]) => {
147+
const parsed = parseMethodArgs(method, args);
148+
const sendPii = isSendDefaultPiiEnabled();
149+
// For concrete string hrefs (e.g. `/users/42`) the pathname carries the
150+
// resolved URL — gate it behind `sendDefaultPii`. Templated pathnames from
151+
// object hrefs (e.g. `{ pathname: '/users/[id]' }`) are structural and safe.
152+
const safePathname = parsed.concretePathname && !sendPii ? undefined : parsed.pathname;
153+
const safeRouteName = parsed.concretePathname && !sendPii ? method : parsed.routeName;
89154

90-
return router;
155+
addBreadcrumb({
156+
category: 'navigation',
157+
type: 'navigation',
158+
message: `Expo Router ${method}${safePathname ? ` to ${safePathname}` : ''}`,
159+
data: {
160+
method,
161+
...(safePathname ? { pathname: safePathname } : undefined),
162+
// `href` (raw URL form) and `params` may contain user identifiers or
163+
// other PII (e.g. `/users/42`, `{ id: '42' }`). Mirror the behavior of
164+
// `reactnavigation.ts` and only include them when `sendDefaultPii` is on.
165+
...(sendPii && parsed.href !== undefined ? { href: serializeHref(parsed.href) } : undefined),
166+
...(sendPii && parsed.params ? { params: parsed.params } : undefined),
167+
},
168+
});
169+
170+
setPendingExpoRouterNavigation({ method });
171+
172+
const span = startInactiveSpan({
173+
op: `navigation.${method}`,
174+
name: `Navigation ${method}${safePathname ? ` to ${safePathname}` : ''}`,
175+
attributes: {
176+
'sentry.origin': SPAN_ORIGIN_AUTO_EXPO_ROUTER_NAVIGATION,
177+
'navigation.method': method,
178+
...(safeRouteName ? { 'route.name': safeRouteName } : undefined),
179+
...(sendPii && parsed.href !== undefined ? { 'route.href': serializeHref(parsed.href) } : undefined),
180+
},
181+
});
182+
183+
try {
184+
const result = original.apply(router, args);
185+
span?.setStatus({ code: SPAN_STATUS_OK });
186+
span?.end();
187+
return result;
188+
} catch (error) {
189+
// Clear the pending value so a failed navigation does not leak its
190+
// method/href onto the next successful idle navigation span.
191+
clearPendingExpoRouterNavigation();
192+
span?.setStatus({ code: SPAN_STATUS_ERROR, message: String(error) });
193+
span?.end();
194+
throw error;
195+
}
196+
};
197+
}
198+
199+
function parseMethodArgs(method: NavigationMethod, args: unknown[]): ParsedHref {
200+
if (method === 'back' || method === 'dismiss') {
201+
return { routeName: method, concretePathname: false };
202+
}
203+
return parseHref(args[0] as ExpoRouterHref | undefined);
204+
}
205+
206+
function parseHref(href: ExpoRouterHref | undefined): ParsedHref {
207+
if (typeof href === 'string') {
208+
return { href, routeName: href, pathname: href, concretePathname: true };
209+
}
210+
if (href && typeof href === 'object') {
211+
const pathname = typeof href.pathname === 'string' ? href.pathname : undefined;
212+
return {
213+
href,
214+
routeName: pathname ?? 'unknown',
215+
pathname,
216+
params: href.params,
217+
concretePathname: false,
218+
};
219+
}
220+
return { routeName: 'unknown', concretePathname: false };
221+
}
222+
223+
/**
224+
* Serializes an href into a string for inclusion in spans/breadcrumbs.
225+
*
226+
* Wrapped in `try/catch` because `params` may contain values that `JSON.stringify`
227+
* cannot serialize (BigInt, Symbol, circular references). A failure here must
228+
* never prevent the underlying navigation from running.
229+
*/
230+
function serializeHref(href: unknown): string {
231+
if (typeof href === 'string') {
232+
return href;
233+
}
234+
try {
235+
return JSON.stringify(href);
236+
} catch {
237+
return '[unserializable href]';
238+
}
239+
}
240+
241+
function isSendDefaultPiiEnabled(): boolean {
242+
return getClient()?.getOptions()?.sendDefaultPii ?? false;
91243
}

packages/core/src/js/tracing/origin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export const SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY = 'auto.ui.time_to_display';
1212
export const SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY = 'manual.ui.time_to_display';
1313

1414
export const SPAN_ORIGIN_AUTO_EXPO_ROUTER_PREFETCH = 'auto.expo_router.prefetch';
15+
export const SPAN_ORIGIN_AUTO_EXPO_ROUTER_NAVIGATION = 'auto.navigation.expo_router';
1516
export const SPAN_ORIGIN_AUTO_RESOURCE_EXPO_IMAGE = 'auto.resource.expo_image';
1617
export const SPAN_ORIGIN_AUTO_RESOURCE_EXPO_ASSET = 'auto.resource.expo_asset';
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Cross-module hand-off between {@link wrapExpoRouter} and the
3+
* {@link reactNavigationIntegration} idle navigation span.
4+
*
5+
* When an Expo Router method (push / replace / navigate / back / dismiss) is
6+
* called, it stores the initiating method here. The next idle navigation span
7+
* consumes (and clears) this value so the span can be attributed to the call
8+
* site via the `navigation.method` attribute.
9+
*/
10+
11+
export interface PendingExpoRouterNavigation {
12+
/** The Expo Router method that initiated the navigation. */
13+
method: 'push' | 'replace' | 'navigate' | 'back' | 'dismiss';
14+
}
15+
16+
let pending: PendingExpoRouterNavigation | undefined;
17+
18+
/** Stores the initiating Expo Router navigation call. Overwrites any previous pending value. */
19+
export function setPendingExpoRouterNavigation(value: PendingExpoRouterNavigation): void {
20+
pending = value;
21+
}
22+
23+
/** Returns and clears the pending Expo Router navigation, if any. */
24+
export function consumePendingExpoRouterNavigation(): PendingExpoRouterNavigation | undefined {
25+
const value = pending;
26+
pending = undefined;
27+
return value;
28+
}
29+
30+
/** Test helper — clears the pending value without consuming it. */
31+
export function clearPendingExpoRouterNavigation(): void {
32+
pending = undefined;
33+
}

packages/core/src/js/tracing/reactnavigation.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
markRootSpanForDiscard,
2828
} from './onSpanEndUtils';
2929
import { SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION } from './origin';
30+
import { consumePendingExpoRouterNavigation } from './pendingExpoRouterNavigation';
3031
import { getReactNativeTracingIntegration } from './reactnativetracing';
3132
import { SEMANTIC_ATTRIBUTE_NAVIGATION_ACTION_TYPE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from './semanticAttributes';
3233
import {
@@ -350,6 +351,13 @@ export const reactNavigationIntegration = ({
350351
const actionType = event?.data?.action?.type;
351352
const targetRouteName = getRouteNameFromAction(event);
352353

354+
// Always drain the pending Expo Router value on this listener invocation —
355+
// even if we end up short-circuiting below (noop / PRELOAD / drawer /
356+
// missing route name). If the underlying router call did not produce an
357+
// idle nav span, the value must not leak onto the next, unrelated
358+
// navigation. Apply it only if we actually create `latestNavigationSpan`.
359+
const pendingExpoRouter = consumePendingExpoRouterNavigation();
360+
353361
if (event && !isAppRestart && !event.data?.noop) {
354362
addBreadcrumb({
355363
category: 'navigation.dispatch',
@@ -451,6 +459,10 @@ export const reactNavigationIntegration = ({
451459
latestNavigationSpan = startGenericIdleNavigationSpan(finalSpanOptions, { ...idleSpanOptions, isAppRestart });
452460
latestNavigationSpan?.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_AUTO_NAVIGATION_REACT_NAVIGATION);
453461
latestNavigationSpan?.setAttribute(SEMANTIC_ATTRIBUTE_NAVIGATION_ACTION_TYPE, navigationActionType);
462+
463+
if (pendingExpoRouter && latestNavigationSpan) {
464+
latestNavigationSpan.setAttribute('navigation.method', pendingExpoRouter.method);
465+
}
454466
if (ignoreEmptyBackNavigationTransactions) {
455467
ignoreEmptyBackNavigation(getClient(), latestNavigationSpan);
456468
}

0 commit comments

Comments
 (0)