From fead9a02f5c7b74fc7dd7ff7b060bedf39c0f8c6 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 19 Feb 2024 14:18:27 +0100 Subject: [PATCH] fx(node): Fix anr worker check --- packages/node/src/integrations/anr/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node/src/integrations/anr/worker.ts b/packages/node/src/integrations/anr/worker.ts index 2e23f823891c..a8b984b48379 100644 --- a/packages/node/src/integrations/anr/worker.ts +++ b/packages/node/src/integrations/anr/worker.ts @@ -173,7 +173,7 @@ if (options.captureStackTrace) { { // Grab the trace context from the current scope expression: - 'const ctx = __SENTRY__.hub.getScope().getPropagationContext(); ctx.traceId + "-" + ctx.spanId + "-" + ctx.parentSpanId', + 'const ctx = __SENTRY__.acs?.getCurrentScope().getPropagationContext() || {}; ctx.traceId + "-" + ctx.spanId + "-" + ctx.parentSpanId', // Don't re-trigger the debugger if this causes an error silent: true, },