Skip to content

Commit 8c32f47

Browse files
author
Luca Forstner
committed
fix
1 parent 38b8ea3 commit 8c32f47

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
addTracingExtensions,
44
captureException,
55
getClient,
6+
getCurrentScope,
67
handleCallbackErrors,
78
startSpanManual,
89
withIsolationScope,
@@ -59,6 +60,7 @@ export function wrapGenerationFunctionWithSentry<F extends (...args: any[]) => a
5960

6061
const propagationContext = commonObjectToPropagationContext(headers, incomingPropagationContext);
6162
isolationScope.setPropagationContext(propagationContext);
63+
getCurrentScope().setPropagationContext(propagationContext);
6264

6365
return startSpanManual(
6466
{

packages/nextjs/src/common/wrapServerComponentWithSentry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
33
addTracingExtensions,
44
captureException,
5+
getCurrentScope,
56
handleCallbackErrors,
67
startSpanManual,
78
withIsolationScope,
@@ -51,6 +52,7 @@ export function wrapServerComponentWithSentry<F extends (...args: any[]) => any>
5152

5253
const propagationContext = commonObjectToPropagationContext(context.headers, incomingPropagationContext);
5354
isolationScope.setPropagationContext(propagationContext);
55+
getCurrentScope().setPropagationContext(propagationContext);
5456

5557
return startSpanManual(
5658
{

0 commit comments

Comments
 (0)