From 26a0abd7abdb97a867e9934e8d3aa610cbfb7ab8 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 16 Jan 2023 16:49:45 +0000 Subject: [PATCH] fix(nextjs): Connect Edge API route errors to span --- packages/nextjs/src/edge/utils/edgeWrapperUtils.ts | 1 + 1 file changed, 1 insertion(+) 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',