Skip to content

Commit 1674e11

Browse files
committed
fix format
1 parent b28f605 commit 1674e11

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ function startOrUpdateSpan(spanName: string, cb: (rootSpan: Span) => Promise<Res
2727

2828
if (rootSpan) {
2929
rootSpan.updateName(spanName);
30-
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
31-
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.server');
32-
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.function.nextjs');
30+
rootSpan.setAttributes({
31+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
32+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.server',
33+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.nextjs',
34+
});
3335

3436
return cb(rootSpan);
3537
} else {

packages/nextjs/src/server/requestIsolationScopeIntegration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ export const requestIsolationScopeIntegration = defineIntegration(() => {
2626
const data = spanJson.data || {};
2727

2828
// The following check is a heuristic to determine whether the started span is a span that tracks an incoming HTTP request
29-
if ((getSpanKind(span) === SpanKind.SERVER && data['http.method']) || (span === getRootSpan(span) && data['next.route'])) {
29+
if (
30+
(getSpanKind(span) === SpanKind.SERVER && data['http.method']) ||
31+
(span === getRootSpan(span) && data['next.route'])
32+
) {
3033
const scopes = getCapturedScopesOnSpan(span);
3134

3235
// Update the isolation scope, isolate this request

0 commit comments

Comments
 (0)