File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/nextjs/src/common Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,7 @@ import { withIsolationScopeOrReuseFromRootSpan } from './utils/withIsolationScop
22
22
23
23
/** As our own HTTP integration is disabled (src/server/index.ts) the rootSpan comes from Next.js.
24
24
* In case there is not root span, we start a new span. */
25
- function startOrUpdateSpan (
26
- spanName : string ,
27
- handleResponseErrors : ( rootSpan : Span ) => Promise < Response > ,
28
- ) : Promise < Response > {
25
+ function startOrUpdateSpan ( spanName : string , cb : ( rootSpan : Span ) => Promise < Response > ) : Promise < Response > {
29
26
const activeSpan = getActiveSpan ( ) ;
30
27
const rootSpan = activeSpan && getRootSpan ( activeSpan ) ;
31
28
@@ -35,7 +32,7 @@ function startOrUpdateSpan(
35
32
rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_OP , 'http.server' ) ;
36
33
rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , 'auto.function.nextjs' ) ;
37
34
38
- return handleResponseErrors ( rootSpan ) ;
35
+ return cb ( rootSpan ) ;
39
36
} else {
40
37
return startSpan (
41
38
{
@@ -48,7 +45,7 @@ function startOrUpdateSpan(
48
45
} ,
49
46
} ,
50
47
( span : Span ) => {
51
- return handleResponseErrors ( span ) ;
48
+ return cb ( span ) ;
52
49
} ,
53
50
) ;
54
51
}
You can’t perform that action at this time.
0 commit comments