From 0bd5761792ff1b62349b531d0402003013183ede Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 22 Oct 2024 15:11:28 +0000 Subject: [PATCH] fix(nextjs): Disable incoming http spans --- packages/nextjs/src/server/index.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/nextjs/src/server/index.ts b/packages/nextjs/src/server/index.ts index 1072dbd22d99..7aade8cbd5c3 100644 --- a/packages/nextjs/src/server/index.ts +++ b/packages/nextjs/src/server/index.ts @@ -99,11 +99,7 @@ export function init(options: NodeOptions): NodeClient | undefined { .concat( // We are using the HTTP integration without instrumenting incoming HTTP requests because Next.js does that by itself. httpIntegration({ - instrumentation: { - _experimentalConfig: { - disableIncomingRequestInstrumentation: true, - }, - }, + disableIncomingRequestSpans: true, }), ); @@ -331,7 +327,7 @@ export function init(options: NodeOptions): NodeClient | undefined { } // backfill transaction name for pages that would otherwise contain unparameterized routes - if (event.contexts.trace.data['sentry.route_backfill'] && event.transaction !== 'GET /_app') { + if (event.contexts.trace.data[TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL] && event.transaction !== 'GET /_app') { event.transaction = `${method} ${event.contexts.trace.data[TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL]}`; }