File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/nextjs/src/server Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,12 @@ export function init(options: NodeOptions): NodeClient | undefined {
106
106
} ) ,
107
107
) ;
108
108
109
- // Turn off Next.js' own fetch instrumentation
109
+ // Turn off Next.js' own fetch instrumentation (only when we manage OTEL)
110
110
// https://github.com/lforst/nextjs-fork/blob/1994fd186defda77ad971c36dc3163db263c993f/packages/next/src/server/lib/patch-fetch.ts#L245
111
- process . env . NEXT_OTEL_FETCH_DISABLED = '1' ;
111
+ // Enable with custom OTel setup: https://github.com/getsentry/sentry-javascript/issues/17581
112
+ if ( ! options . skipOpenTelemetrySetup ) {
113
+ process . env . NEXT_OTEL_FETCH_DISABLED = '1' ;
114
+ }
112
115
113
116
// This value is injected at build time, based on the output directory specified in the build config. Though a default
114
117
// is set there, we set it here as well, just in case something has gone wrong with the injection.
You can’t perform that action at this time.
0 commit comments