Skip to content

Commit fb4053f

Browse files
committed
small ref
1 parent 668c276 commit fb4053f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/node/src/integrations/node-fetch/SentryNodeFetchInstrumentation.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ export class SentryNodeFetchInstrumentation extends InstrumentationBase<SentryNo
121121
const tracePropagationTargets = getClient()?.getOptions().tracePropagationTargets;
122122
const addedHeaders = shouldPropagateTraceForUrl(url, tracePropagationTargets, this._propagationDecisionMap)
123123
? getTraceData()
124-
: {};
124+
: undefined;
125+
126+
if (!addedHeaders) {
127+
return;
128+
}
125129

126130
// We do not want to overwrite existing headers here
127131
// If the core UndiciInstrumentation is registered, it will already have set the headers

0 commit comments

Comments
 (0)