From 773bb9c5f64f95cfafa561f61f498b60f59ecd50 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 9 Sep 2024 11:38:03 +0000 Subject: [PATCH] . --- packages/nextjs/src/common/wrapServerComponentWithSentry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts index a75bfa8a2659..e8d734a90ff3 100644 --- a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts +++ b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts @@ -39,8 +39,6 @@ export function wrapServerComponentWithSentry any> const requestTraceId = getActiveSpan()?.spanContext().traceId; const isolationScope = commonObjectToIsolationScope(context.headers); - const headersDict = context.headers ? winterCGHeadersToDict(context.headers) : undefined; - const activeSpan = getActiveSpan(); if (activeSpan) { const rootSpan = getRootSpan(activeSpan); @@ -51,6 +49,8 @@ export function wrapServerComponentWithSentry any> rootSpan.setAttribute('sentry.rsc', true); } + const headersDict = context.headers ? winterCGHeadersToDict(context.headers) : undefined; + isolationScope.setSDKProcessingMetadata({ request: { headers: headersDict,