Skip to content

Commit 2c9b95f

Browse files
committed
moar debug
1 parent 152c9bf commit 2c9b95f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/nextjs/src/common/utils/withIsolationScopeOrReuseFromRootSpan.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ import type { Scope } from '@sentry/types';
1414
*/
1515
export function withIsolationScopeOrReuseFromRootSpan<T>(cb: (isolationScope: Scope) => T): T {
1616
const activeSpan = getActiveSpan();
17-
console.log('with isolation scope or reuse', activeSpan ? spanToJSON(activeSpan) : 'no active span');
1817

1918
if (!activeSpan) {
2019
return withIsolationScope(cb);
2120
}
2221

2322
const rootSpan = getRootSpan(activeSpan);
2423

24+
rootSpan?.setAttribute('sentry.rootSpanExists', true);
25+
2526
// Verify this is a next span
2627
if (!spanToJSON(rootSpan).data?.['next.route']) {
2728
return withIsolationScope(cb);
2829
}
2930

31+
rootSpan?.setAttribute('sentry.hasNextRoute', true);
32+
3033
const scopes = getCapturedScopesOnSpan(rootSpan);
3134

3235
const isolationScope = scopes.isolationScope;

0 commit comments

Comments
 (0)