Skip to content

Commit 27f54e2

Browse files
committed
TELL ME WHY?!
1 parent 3cf4bc4 commit 27f54e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function startOrUpdateSpan(spanName: string, cb: (rootSpan: Span) => Promise<Res
3535
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.server');
3636
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.function.nextjs');
3737
rootSpan.setAttribute('WIP_TEST', 'yes');
38+
rootSpan.setAttribute('WIP_UPDATED_THIS', 'yes');
3839

3940
return cb(rootSpan);
4041
} else {
@@ -95,6 +96,16 @@ export function wrapRouteHandlerWithSentry<F extends (...args: any[]) => any>(
9596
});
9697
}
9798

99+
rootSpan.setAttribute('has_span_scopes_2', !!getSpanScopes(rootSpan));
100+
101+
const activeSpan = getActiveSpan();
102+
if (activeSpan) {
103+
setSpanScopes(activeSpan, {
104+
scope: getCurrentScope(),
105+
isolationScope,
106+
});
107+
}
108+
98109
const response: Response = await handleCallbackErrors(
99110
() => originalFunction.apply(thisArg, args),
100111
error => {

0 commit comments

Comments
 (0)