Skip to content

Commit 87f0261

Browse files
committed
remove call to withScope
1 parent d0300e6 commit 87f0261

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/node/src/integrations/http/SentryHttpInstrumentation.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import {
1212
generateSpanId,
1313
getBreadcrumbLogLevelFromHttpStatusCode,
1414
getClient,
15+
getCurrentScope,
1516
getIsolationScope,
1617
getSanitizedUrlString,
1718
httpRequestToRequestData,
1819
logger,
1920
parseUrl,
2021
stripUrlQueryAndFragment,
2122
withIsolationScope,
22-
withScope,
2323
} from '@sentry/core';
2424
import { DEBUG_BUILD } from '../../debug-build';
2525
import { getRequestUrl } from '../../utils/getRequestUrl';
@@ -185,11 +185,9 @@ export class SentryHttpInstrumentation extends InstrumentationBase<SentryHttpIns
185185
}
186186

187187
return withIsolationScope(isolationScope, () => {
188-
return withScope(scope => {
189-
// Set a new propagationSpanId for this request
190-
scope.getPropagationContext().propagationSpanId = generateSpanId();
191-
return original.apply(this, [event, ...args]);
192-
});
188+
// Set a new propagationSpanId for this request
189+
getCurrentScope().getPropagationContext().propagationSpanId = generateSpanId();
190+
return original.apply(this, [event, ...args]);
193191
});
194192
};
195193
};

0 commit comments

Comments
 (0)