Skip to content

Commit 4fce49d

Browse files
Lms24claude
andcommitted
test(nextjs): Assert url.path on streamed pageload spans
The streaming E2E specs asserted a `url.pathname` attribute that no SDK code sets. Pageload spans carry `url.path`, set by `browserTracingIntegration` when it creates the route span, so these assertions could never match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent af0c0dc commit 4fce49d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎dev-packages/e2e-tests/test-applications/nextjs-16-streaming-cacheComponents/tests/cacheComponents.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test('Prerendered shell does not stitch the pageload onto a stale trace', async
8282

8383
expect(pageloadSpan.attributes).toMatchObject({
8484
['sentry.segment.name.source']: { value: 'url', type: 'string' },
85-
['url.pathname']: { value: '/pageload-tracing', type: 'string' },
85+
['url.path']: { value: '/pageload-tracing', type: 'string' },
8686
});
8787
// Under Cache Components the can be prerendered and rendered in a context detached from the
8888
// runtime server request, so a `sentry-trace` meta tag would carry a stale/unrelated trace. The

‎dev-packages/e2e-tests/test-applications/nextjs-16-streaming/tests/pageload-tracing.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ test('Server and client pageload spans should share the same trace', async ({ pa
1818
expect(serverSpan.trace_id).toBe(pageloadSpan.trace_id);
1919
expect(pageloadSpan.attributes).toMatchObject({
2020
['sentry.segment.name.source']: { value: 'url', type: 'string' },
21-
['url.pathname']: { value: '/pageload-tracing', type: 'string' },
21+
['url.path']: { value: '/pageload-tracing', type: 'string' },
2222
});
2323
});

‎dev-packages/e2e-tests/test-applications/nextjs-16-streaming/tests/parameterized-routes.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test('should create a static streamed span when the `app` directory is used and
3030
expect(span.trace_id).toMatch(/[a-f0-9]{32}/);
3131
expect(span.attributes).toMatchObject({
3232
['sentry.segment.name.source']: { value: 'url', type: 'string' },
33-
['url.pathname']: { value: '/parameterized/static', type: 'string' },
33+
['url.path']: { value: '/parameterized/static', type: 'string' },
3434
});
3535
});
3636

0 commit comments

Comments
 (0)