diff --git a/packages/profiling-node/src/integration.ts b/packages/profiling-node/src/integration.ts index 8aed8eb3a305..c9b9fe12056d 100644 --- a/packages/profiling-node/src/integration.ts +++ b/packages/profiling-node/src/integration.ts @@ -85,7 +85,7 @@ function setupAutomatedSpanProfiling(client: NodeClient): void { // Unref timeout so it doesn't keep the process alive. timeout.unref(); - getCurrentScope().setContext('profile', { profile_id }); + getIsolationScope().setContext('profile', { profile_id }); spanToProfileIdMap.set(span, profile_id); } });