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 @@ -21,10 +21,7 @@ import { flushQueue } from './utils/responseEnd';
21
21
22
22
/** As our own HTTP integration is disabled (src/server/index.ts) the rootSpan comes from Next.js.
23
23
* In case there is not root span, we start a new span. */
24
- function startOrUpdateSpan (
25
- spanName : string ,
26
- handleResponseErrors : ( rootSpan : Span ) => Promise < Response > ,
27
- ) : Promise < Response > {
24
+ function startOrUpdateSpan ( spanName : string , cb : ( rootSpan : Span ) => Promise < Response > ) : Promise < Response > {
28
25
const activeSpan = getActiveSpan ( ) ;
29
26
const rootSpan = activeSpan && getRootSpan ( activeSpan ) ;
30
27
@@ -34,7 +31,7 @@ function startOrUpdateSpan(
34
31
rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_OP , 'http.server' ) ;
35
32
rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , 'auto.function.nextjs' ) ;
36
33
37
- return handleResponseErrors ( rootSpan ) ;
34
+ return cb ( rootSpan ) ;
38
35
} else {
39
36
return startSpan (
40
37
{
@@ -47,7 +44,7 @@ function startOrUpdateSpan(
47
44
} ,
48
45
} ,
49
46
( span : Span ) => {
50
- return handleResponseErrors ( span ) ;
47
+ return cb ( span ) ;
51
48
} ,
52
49
) ;
53
50
}
You can’t perform that action at this time.
0 commit comments