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
2222
2323/** As our own HTTP integration is disabled (src/server/index.ts) the rootSpan comes from Next.js.
2424 * 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 > {
2926 const activeSpan = getActiveSpan ( ) ;
3027 const rootSpan = activeSpan && getRootSpan ( activeSpan ) ;
3128
@@ -35,7 +32,7 @@ function startOrUpdateSpan(
3532 rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_OP , 'http.server' ) ;
3633 rootSpan . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , 'auto.function.nextjs' ) ;
3734
38- return handleResponseErrors ( rootSpan ) ;
35+ return cb ( rootSpan ) ;
3936 } else {
4037 return startSpan (
4138 {
@@ -48,7 +45,7 @@ function startOrUpdateSpan(
4845 } ,
4946 } ,
5047 ( span : Span ) => {
51- return handleResponseErrors ( span ) ;
48+ return cb ( span ) ;
5249 } ,
5350 ) ;
5451 }
You can’t perform that action at this time.
0 commit comments