@sentry/opentelemetry 9.21.0 → 9.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1302,7 +1302,7 @@ function setOpenTelemetryContextAsyncContextStrategy() {
1302
1302
  }
1303
1303
 
1304
1304
  function withSetScope(scope, callback) {
1305
- const ctx = api.context.active();
1305
+ const ctx = getContextFromScope(scope) || api.context.active();
1306
1306
 
1307
1307
  // We depend on the otelContextManager to handle the context/hub
1308
1308
  // We set the `SENTRY_FORK_SET_SCOPE_CONTEXT_KEY` context value, which is picked up by