Skip to content
Prev Previous commit
removed unused header obj
  • Loading branch information
chargome committed Oct 1, 2025
commit d727ee9f46ada5908190d44c53d03b154fff6990
3 changes: 0 additions & 3 deletions packages/nextjs/src/common/wrapMiddlewareWithSentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export function wrapMiddlewareWithSentry<H extends EdgeRouteHandler>(

let spanName: string;
let spanSource: TransactionSource;
const headerAttributes: Record<string, string> = {};

if (req instanceof Request) {
isolationScope.setSDKProcessingMetadata({
Expand All @@ -85,7 +84,6 @@ export function wrapMiddlewareWithSentry<H extends EdgeRouteHandler>(
const rootSpan = getRootSpan(activeSpan);
if (rootSpan) {
setCapturedScopesOnSpan(rootSpan, currentScope, isolationScope);
rootSpan.setAttributes(headerAttributes);
}
}

Expand All @@ -96,7 +94,6 @@ export function wrapMiddlewareWithSentry<H extends EdgeRouteHandler>(
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: spanSource,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.nextjs.wrap_middleware',
...headerAttributes,
},
},
() => {
Expand Down