@sentry/opentelemetry 8.3.0 → 8.5.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.
- package/cjs/index.js +3 -3
- package/cjs/index.js.map +1 -1
- package/esm/index.js +3 -3
- package/esm/index.js.map +1 -1
- package/package.json +4 -4
- package/types/contextManager.d.ts +1 -1
- package/types-ts3.8/contextManager.d.ts +1 -1
package/esm/index.js
CHANGED
|
@@ -1220,7 +1220,7 @@ function setOpenTelemetryContextAsyncContextStrategy() {
|
|
|
1220
1220
|
function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1221
1221
|
|
|
1222
1222
|
/**
|
|
1223
|
-
* Wrap an OpenTelemetry ContextManager in a way that ensures the context is kept in sync with the Sentry
|
|
1223
|
+
* Wrap an OpenTelemetry ContextManager in a way that ensures the context is kept in sync with the Sentry Scope.
|
|
1224
1224
|
*
|
|
1225
1225
|
* Usage:
|
|
1226
1226
|
* import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
@@ -1232,7 +1232,7 @@ function wrapContextManagerClass(
|
|
|
1232
1232
|
) {
|
|
1233
1233
|
/**
|
|
1234
1234
|
* This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
|
|
1235
|
-
* It ensures that we create
|
|
1235
|
+
* It ensures that we create new scopes per context, so that the OTEL Context & the Sentry Scope are always in sync.
|
|
1236
1236
|
*
|
|
1237
1237
|
* Note that we currently only support AsyncHooks with this,
|
|
1238
1238
|
* but since this should work for Node 14+ anyhow that should be good enough.
|
|
@@ -1246,7 +1246,7 @@ function wrapContextManagerClass(
|
|
|
1246
1246
|
}
|
|
1247
1247
|
/**
|
|
1248
1248
|
* Overwrite with() of the original AsyncLocalStorageContextManager
|
|
1249
|
-
* to ensure we also create
|
|
1249
|
+
* to ensure we also create new scopes per context.
|
|
1250
1250
|
*/
|
|
1251
1251
|
with(
|
|
1252
1252
|
context,
|