diff --git a/packages/node-experimental/src/integrations/anr/worker.ts b/packages/node-experimental/src/integrations/anr/worker.ts index 5c3cb51f3381..9bcbf9cb7b03 100644 --- a/packages/node-experimental/src/integrations/anr/worker.ts +++ b/packages/node-experimental/src/integrations/anr/worker.ts @@ -172,7 +172,7 @@ if (options.captureStackTrace) { { // Grab the trace context from the current scope expression: - 'const ctx = __SENTRY__.acs?.getCurrentScope().getPropagationContext() || {}; ctx.traceId + "-" + ctx.spanId + "-" + ctx.parentSpanId', + 'var __sentry_ctx = __SENTRY__.acs?.getCurrentScope().getPropagationContext() || {}; __sentry_ctx.traceId + "-" + __sentry_ctx.spanId + "-" + __sentry_ctx.parentSpanId', // Don't re-trigger the debugger if this causes an error silent: true, },