diff --git a/packages/nextjs/src/edge/utils/edgeWrapperUtils.ts b/packages/nextjs/src/edge/utils/edgeWrapperUtils.ts index 4727c1867d9c..dfca783f1d61 100644 --- a/packages/nextjs/src/edge/utils/edgeWrapperUtils.ts +++ b/packages/nextjs/src/edge/utils/edgeWrapperUtils.ts @@ -80,6 +80,7 @@ export function withEdgeWrapping( span?.setStatus('internal_error'); captureException(objectifiedErr, scope => { + scope.setSpan(span); scope.addEventProcessor(event => { addExceptionMechanism(event, { type: 'instrument',