Skip to content

Commit cf111cc

Browse files
author
Luca Forstner
committed
.
1 parent 8addc76 commit cf111cc

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

dev-packages/e2e-tests/test-applications/nextjs-15/app/prefetching/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link';
22

33
export default function Page() {
44
return (
5-
<Link prefetch id="prefetch-link" href="/prefetching/to-be-prefetched">
5+
<Link id="prefetch-link" href="/prefetching/to-be-prefetched">
66
link
77
</Link>
88
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export const dynamic = 'force-dynamic';
2+
13
export default function Page() {
24
return <p>Hello</p>;
35
}

dev-packages/e2e-tests/test-applications/nextjs-15/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

dev-packages/e2e-tests/test-applications/nextjs-15/tests/prefetch-spans.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ test('Prefetch client spans should have the right op', async ({ page }) => {
1313

1414
expect((await pageloadTransactionPromise).spans).toContainEqual(
1515
expect.objectContaining({
16-
op: 'http.client.prefetch',
16+
op: 'http.client',
17+
data: expect.objectContaining({
18+
'http.request.prefetch': true,
19+
}),
1720
}),
1821
);
1922
});

packages/nextjs/src/client/browserTracingIntegration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Integration } from '@sentry/core';
2-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
32
import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/react';
43
import { nextRouterInstrumentNavigation, nextRouterInstrumentPageLoad } from './routing/nextRoutingInstrumentation';
54

@@ -18,7 +17,7 @@ export function browserTracingIntegration(
1817

1918
// Next.js prefetch requests have a `next-router-prefetch` header
2019
if (headers?.get('next-router-prefetch')) {
21-
span?.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.client.prefetch');
20+
span?.setAttribute('http.request.prefetch', true);
2221
}
2322

2423
return options.onRequestSpanStart?.(...args);

0 commit comments

Comments
 (0)