Skip to content
Closed
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
10 changes: 4 additions & 6 deletions packages/node/src/integrations/http/SentryHttpInstrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import {
generateSpanId,
getBreadcrumbLogLevelFromHttpStatusCode,
getClient,
getCurrentScope,
getIsolationScope,
getSanitizedUrlString,
httpRequestToRequestData,
logger,
parseUrl,
stripUrlQueryAndFragment,
withIsolationScope,
withScope,
} from '@sentry/core';
import { DEBUG_BUILD } from '../../debug-build';
import { getRequestUrl } from '../../utils/getRequestUrl';
Expand Down Expand Up @@ -185,11 +185,9 @@ export class SentryHttpInstrumentation extends InstrumentationBase<SentryHttpIns
}

return withIsolationScope(isolationScope, () => {
return withScope(scope => {
// Set a new propagationSpanId for this request
scope.getPropagationContext().propagationSpanId = generateSpanId();
return original.apply(this, [event, ...args]);
});
// Set a new propagationSpanId for this request
getCurrentScope().getPropagationContext().propagationSpanId = generateSpanId();
return original.apply(this, [event, ...args]);
});
};
};
Expand Down
Loading