Skip to content

Commit

Permalink
fix(nextjs): Disable incoming http spans (#14052)
Browse files Browse the repository at this point in the history
incoming reqs.
  • Loading branch information
lforst authored Oct 22, 2024
1 parent 9e25f02 commit e77cb72
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/nextjs/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
);

Expand Down Expand Up @@ -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]}`;
}

Expand Down

0 comments on commit e77cb72

Please sign in to comment.