@sentry/opentelemetry 8.2.1 → 8.4.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/LICENSE +18 -11
- 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/LICENSE
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
|
5
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
6
|
-
persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
3
|
+
Copyright (c) 2023-2024 Functional Software, Inc. dba Sentry
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
Software
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
so, subject to the following conditions:
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/cjs/index.js
CHANGED
|
@@ -1223,7 +1223,7 @@ function setOpenTelemetryContextAsyncContextStrategy() {
|
|
|
1223
1223
|
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; }
|
|
1224
1224
|
|
|
1225
1225
|
/**
|
|
1226
|
-
* Wrap an OpenTelemetry ContextManager in a way that ensures the context is kept in sync with the Sentry
|
|
1226
|
+
* Wrap an OpenTelemetry ContextManager in a way that ensures the context is kept in sync with the Sentry Scope.
|
|
1227
1227
|
*
|
|
1228
1228
|
* Usage:
|
|
1229
1229
|
* import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
@@ -1235,7 +1235,7 @@ function wrapContextManagerClass(
|
|
|
1235
1235
|
) {
|
|
1236
1236
|
/**
|
|
1237
1237
|
* This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
|
|
1238
|
-
* It ensures that we create
|
|
1238
|
+
* It ensures that we create new scopes per context, so that the OTEL Context & the Sentry Scope are always in sync.
|
|
1239
1239
|
*
|
|
1240
1240
|
* Note that we currently only support AsyncHooks with this,
|
|
1241
1241
|
* but since this should work for Node 14+ anyhow that should be good enough.
|
|
@@ -1249,7 +1249,7 @@ function wrapContextManagerClass(
|
|
|
1249
1249
|
}
|
|
1250
1250
|
/**
|
|
1251
1251
|
* Overwrite with() of the original AsyncLocalStorageContextManager
|
|
1252
|
-
* to ensure we also create
|
|
1252
|
+
* to ensure we also create new scopes per context.
|
|
1253
1253
|
*/
|
|
1254
1254
|
with(
|
|
1255
1255
|
context,
|