Skip to content

Commit

Permalink
fix it actually
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jan 30, 2025
1 parent 34644f4 commit 653a5d8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ export class SentryNodeFetchInstrumentation extends InstrumentationBase<SentryNo
return;
}

addedHeaders['sentry-trace'] = `${addedHeaders['sentry-trace']}-ZZZZ`;

// We do not want to overwrite existing headers here
// If the core UndiciInstrumentation is registered, it will already have set the headers
// We do not want to add any then
Expand All @@ -137,9 +135,9 @@ export class SentryNodeFetchInstrumentation extends InstrumentationBase<SentryNo
Object.entries(addedHeaders)
.filter(([k]) => {
// If the header already exists, we do not want to set it again
return !requestHeaders.includes(`${k}:`);
return !requestHeaders.includes(k);
})
.forEach(headers => requestHeaders.push(...headers));
.forEach(keyValuePair => requestHeaders.push(...keyValuePair));
} else {
const requestHeaders = request.headers;
request.headers += Object.entries(addedHeaders)
Expand Down

0 comments on commit 653a5d8

Please sign in to comment.