Skip to content

Commit e77cb72

Browse files
author
Luca Forstner
authored
fix(nextjs): Disable incoming http spans (#14052)
incoming reqs.
1 parent 9e25f02 commit e77cb72

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/nextjs/src/server/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ export function init(options: NodeOptions): NodeClient | undefined {
9999
.concat(
100100
// We are using the HTTP integration without instrumenting incoming HTTP requests because Next.js does that by itself.
101101
httpIntegration({
102-
instrumentation: {
103-
_experimentalConfig: {
104-
disableIncomingRequestInstrumentation: true,
105-
},
106-
},
102+
disableIncomingRequestSpans: true,
107103
}),
108104
);
109105

@@ -331,7 +327,7 @@ export function init(options: NodeOptions): NodeClient | undefined {
331327
}
332328

333329
// backfill transaction name for pages that would otherwise contain unparameterized routes
334-
if (event.contexts.trace.data['sentry.route_backfill'] && event.transaction !== 'GET /_app') {
330+
if (event.contexts.trace.data[TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL] && event.transaction !== 'GET /_app') {
335331
event.transaction = `${method} ${event.contexts.trace.data[TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL]}`;
336332
}
337333

0 commit comments

Comments
 (0)