Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/nextjs/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ export function init(options: NodeOptions): NodeClient | undefined {
}),
);

// Turn off Next.js' own fetch instrumentation
// Turn off Next.js' own fetch instrumentation (only when we manage OTEL)
// https://github.com/lforst/nextjs-fork/blob/1994fd186defda77ad971c36dc3163db263c993f/packages/next/src/server/lib/patch-fetch.ts#L245
process.env.NEXT_OTEL_FETCH_DISABLED = '1';
// Enable with custom OTel setup: https://github.com/getsentry/sentry-javascript/issues/17581
if (!options.skipOpenTelemetrySetup) {
process.env.NEXT_OTEL_FETCH_DISABLED = '1';
}

// This value is injected at build time, based on the output directory specified in the build config. Though a default
// is set there, we set it here as well, just in case something has gone wrong with the injection.
Expand Down
Loading