Skip to content

Commit f50d850

Browse files
committed
fixes
1 parent 6e0874e commit f50d850

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

dev-packages/e2e-tests/test-applications/react-router-7-framework-instrumentation/tests/performance/navigation.client.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { APP_NAME } from '../constants';
88
// The legacy `instrumentHydratedRouter()` subscribe callback still runs and updates the span
99
// name to its parameterized form (so `sentry.source` ends up as `route`).
1010
//
11-
// Previously these tests asserted the legacy origin `auto.navigation.react_router`, but that was
12-
// only true because of a bug where the subscribe callback unconditionally overwrote the origin.
1311
// See: https://github.com/remix-run/react-router/discussions/13749
1412

15-
test.describe('client - navigation via instrumentation API', () => {
16-
test('should send navigation transaction with instrumentation API origin', async ({ page }) => {
13+
test.describe('client - hybrid navigation (instrumentation API span + legacy parameterization)', () => {
14+
test('should create navigation span via instrumentation API and parameterize via legacy subscribe', async ({
15+
page,
16+
}) => {
1717
// First load the performance page
1818
await page.goto(`/performance`);
1919
await page.waitForTimeout(1000);
@@ -34,6 +34,12 @@ test.describe('client - navigation via instrumentation API', () => {
3434
trace: {
3535
op: 'navigation',
3636
origin: 'auto.navigation.react_router.instrumentation_api',
37+
data: {
38+
'sentry.source': 'route',
39+
'sentry.op': 'navigation',
40+
'sentry.origin': 'auto.navigation.react_router.instrumentation_api',
41+
'navigation.type': 'router.navigate',
42+
},
3743
},
3844
},
3945
transaction: '/performance/ssr',

0 commit comments

Comments
 (0)