@sentry/opentelemetry
Advanced tools
| import { Context, ContextManager } from '@opentelemetry/api'; | ||
| import { AsyncLocalStorage } from 'node:async_hooks'; | ||
| import { AsyncLocalStorageLookup } from './contextManager'; | ||
| /** | ||
| * OpenTelemetry-compatible context manager using Node.js `AsyncLocalStorage`. | ||
| * Semantics match `@opentelemetry/context-async-hooks` (function `bind` + `EventEmitter` patching). | ||
| */ | ||
| export declare class SentryAsyncLocalStorageContextManager implements ContextManager { | ||
| protected readonly _asyncLocalStorage: AsyncLocalStorage<Context>; | ||
| private readonly _kOtListeners; | ||
| private _wrapped; | ||
| constructor(); | ||
| active(): Context; | ||
| with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(context: Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>; | ||
| enable(): this; | ||
| disable(): this; | ||
| bind<T>(context: Context, target: T): T; | ||
| /** | ||
| * Gets underlying AsyncLocalStorage and symbol to allow lookup of scope. | ||
| * This is Sentry-specific. | ||
| */ | ||
| getAsyncLocalStorageLookup(): AsyncLocalStorageLookup; | ||
| private _bindFunction; | ||
| private _bindEventEmitter; | ||
| private _patchRemoveListener; | ||
| private _patchRemoveAllListeners; | ||
| private _patchAddListener; | ||
| private _createPatchMap; | ||
| private _getPatchMap; | ||
| } | ||
| //# sourceMappingURL=asyncLocalStorageContextManager.d.ts.map |
| import { Attributes, AttributeValue } from '@opentelemetry/api'; | ||
| type RawResourceAttribute = [ | ||
| string, | ||
| AttributeValue | undefined | ||
| ]; | ||
| /** | ||
| * Minimal Resource implementation that satisfies the OpenTelemetry Resource interface | ||
| * used by BasicTracerProvider, without depending on `@opentelemetry/resources`. | ||
| */ | ||
| declare class SentryResource { | ||
| private _attributes; | ||
| constructor(attributes: Attributes); | ||
| readonly attributes: Attributes; | ||
| merge(other: SentryResource | null): SentryResource; | ||
| getRawAttributes(): RawResourceAttribute[]; | ||
| } | ||
| /** | ||
| * Returns a Resource for use in Sentry's OpenTelemetry TracerProvider setup. | ||
| * | ||
| * Combines the default OTel SDK telemetry attributes with Sentry-specific | ||
| * service attributes, equivalent to what was previously done via: | ||
| * `defaultResource().merge(resourceFromAttributes({ ... }))` | ||
| */ | ||
| export declare function getSentryResource(serviceName: string): SentryResource; | ||
| export {}; | ||
| //# sourceMappingURL=resource.d.ts.map |
| import { Context } from '@opentelemetry/api'; | ||
| /** | ||
| * Merge Sentry scopes into an OpenTelemetry {@link Context} and apply trace-context adjustments | ||
| * used by Sentry OpenTelemetry context manager(s). | ||
| * | ||
| * @param context - Context passed into `ContextManager.with`. | ||
| * @param activeContext - Context that was active before entering `with` (e.g. `this.active()`), used | ||
| * to restore the parent span when the incoming span is marked ignored for children. | ||
| * @returns A new context ready for `super.with` / `AsyncLocalStorage.run`. | ||
| */ | ||
| export declare function buildContextWithSentryScopes(context: Context, activeContext: Context): Context; | ||
| //# sourceMappingURL=buildContextWithSentryScopes.d.ts.map |
| import type { Context, ContextManager } from '@opentelemetry/api'; | ||
| import { AsyncLocalStorage } from 'node:async_hooks'; | ||
| import type { AsyncLocalStorageLookup } from './contextManager'; | ||
| /** | ||
| * OpenTelemetry-compatible context manager using Node.js `AsyncLocalStorage`. | ||
| * Semantics match `@opentelemetry/context-async-hooks` (function `bind` + `EventEmitter` patching). | ||
| */ | ||
| export declare class SentryAsyncLocalStorageContextManager implements ContextManager { | ||
| protected readonly _asyncLocalStorage: AsyncLocalStorage<Context>; | ||
| private readonly _kOtListeners; | ||
| private _wrapped; | ||
| constructor(); | ||
| active(): Context; | ||
| with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(context: Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>; | ||
| enable(): this; | ||
| disable(): this; | ||
| bind<T>(context: Context, target: T): T; | ||
| /** | ||
| * Gets underlying AsyncLocalStorage and symbol to allow lookup of scope. | ||
| * This is Sentry-specific. | ||
| */ | ||
| getAsyncLocalStorageLookup(): AsyncLocalStorageLookup; | ||
| private _bindFunction; | ||
| private _bindEventEmitter; | ||
| private _patchRemoveListener; | ||
| private _patchRemoveAllListeners; | ||
| private _patchAddListener; | ||
| private _createPatchMap; | ||
| private _getPatchMap; | ||
| } | ||
| //# sourceMappingURL=asyncLocalStorageContextManager.d.ts.map |
| {"version":3,"file":"asyncLocalStorageContextManager.d.ts","sourceRoot":"","sources":["../../src/asyncLocalStorageContextManager.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAahE;;;GAGG;AACH,qBAAa,qCAAsC,YAAW,cAAc;IAC1E,SAAS,CAAC,QAAQ,CAAC,kBAAkB,6BAAoC;IAEzE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IACvD,OAAO,CAAC,QAAQ,CAAS;;IAMlB,MAAM,IAAI,OAAO;IAIjB,IAAI,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EACtE,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC9B,GAAG,IAAI,EAAE,CAAC,GACT,UAAU,CAAC,CAAC,CAAC;IAMT,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAKf,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC;IAU9C;;;OAGG;IACI,0BAA0B,IAAI,uBAAuB;IAO5D,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,wBAAwB;IAiBhC,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,YAAY;CAGrB"} |
| import type { Attributes, AttributeValue } from '@opentelemetry/api'; | ||
| type RawResourceAttribute = [string, AttributeValue | undefined]; | ||
| /** | ||
| * Minimal Resource implementation that satisfies the OpenTelemetry Resource interface | ||
| * used by BasicTracerProvider, without depending on `@opentelemetry/resources`. | ||
| */ | ||
| declare class SentryResource { | ||
| private _attributes; | ||
| constructor(attributes: Attributes); | ||
| get attributes(): Attributes; | ||
| merge(other: SentryResource | null): SentryResource; | ||
| getRawAttributes(): RawResourceAttribute[]; | ||
| } | ||
| /** | ||
| * Returns a Resource for use in Sentry's OpenTelemetry TracerProvider setup. | ||
| * | ||
| * Combines the default OTel SDK telemetry attributes with Sentry-specific | ||
| * service attributes, equivalent to what was previously done via: | ||
| * `defaultResource().merge(resourceFromAttributes({ ... }))` | ||
| */ | ||
| export declare function getSentryResource(serviceName: string): SentryResource; | ||
| export {}; | ||
| //# sourceMappingURL=resource.d.ts.map |
| {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAYrE,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;AAEjE;;;GAGG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,WAAW,CAAa;gBAEb,UAAU,EAAE,UAAU;IAIzC,IAAW,UAAU,IAAI,UAAU,CAElC;IAEM,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,GAAG,cAAc;IAOnD,gBAAgB,IAAI,oBAAoB,EAAE;CAGlD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAUrE"} |
| import type { Context } from '@opentelemetry/api'; | ||
| /** | ||
| * Merge Sentry scopes into an OpenTelemetry {@link Context} and apply trace-context adjustments | ||
| * used by Sentry OpenTelemetry context manager(s). | ||
| * | ||
| * @param context - Context passed into `ContextManager.with`. | ||
| * @param activeContext - Context that was active before entering `with` (e.g. `this.active()`), used | ||
| * to restore the parent span when the incoming span is marked ignored for children. | ||
| * @returns A new context ready for `super.with` / `AsyncLocalStorage.run`. | ||
| */ | ||
| export declare function buildContextWithSentryScopes(context: Context, activeContext: Context): Context; | ||
| //# sourceMappingURL=buildContextWithSentryScopes.d.ts.map |
| {"version":3,"file":"buildContextWithSentryScopes.d.ts","sourceRoot":"","sources":["../../../src/utils/buildContextWithSentryScopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAYlD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAkC9F"} |
@@ -1,1 +0,1 @@ | ||
| {"type":"module","version":"10.48.0","sideEffects":false} | ||
| {"type":"module","version":"10.49.0","sideEffects":false} |
@@ -17,2 +17,4 @@ import { AsyncLocalStorage } from 'node:async_hooks'; | ||
| * const contextManager = new SentryContextManager(); | ||
| * | ||
| * @deprecated Use {@link SentryAsyncLocalStorageContextManager} instead. | ||
| */ | ||
@@ -19,0 +21,0 @@ export declare function wrapContextManagerClass<ContextManagerInstance extends ContextManager>(ContextManagerClass: new (...args: unknown[]) => ContextManagerInstance): ExtendedContextManagerInstance<ContextManagerInstance>; |
@@ -17,2 +17,3 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from './semanticAttributes'; | ||
| export { wrapContextManagerClass } from './contextManager'; | ||
| export { SentryAsyncLocalStorageContextManager } from './asyncLocalStorageContextManager'; | ||
| export { AsyncLocalStorageLookup } from './contextManager'; | ||
@@ -23,4 +24,5 @@ export { SentryPropagator, shouldPropagateTraceForUrl } from './propagator'; | ||
| export { openTelemetrySetupCheck } from './utils/setupCheck'; | ||
| export { getSentryResource } from './resource'; | ||
| export { withStreamedSpan } from '@sentry/core'; | ||
| export { getClient } from '@sentry/core'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -17,2 +17,8 @@ import { Context } from '@opentelemetry/api'; | ||
| * We need this to get the context from the scope in the `trace` functions. | ||
| * | ||
| * We use WeakRef to avoid a circular reference between the scope and the context. | ||
| * The context holds scopes (via SENTRY_SCOPES_CONTEXT_KEY), and if the scope held | ||
| * a strong reference back to the context, neither could be garbage collected even | ||
| * when the context is no longer reachable from application code (e.g., after a | ||
| * request completes but pooled connections retain patched callbacks). | ||
| */ | ||
@@ -22,4 +28,5 @@ export declare function setContextOnScope(scope: Scope, context: Context): void; | ||
| * Get the context related to a scope. | ||
| * Returns undefined if the context has been garbage collected (when WeakRef is used). | ||
| */ | ||
| export declare function getContextFromScope(scope: Scope): Context | undefined; | ||
| //# sourceMappingURL=contextData.d.ts.map |
@@ -17,2 +17,4 @@ import type { AsyncLocalStorage } from 'node:async_hooks'; | ||
| * const contextManager = new SentryContextManager(); | ||
| * | ||
| * @deprecated Use {@link SentryAsyncLocalStorageContextManager} instead. | ||
| */ | ||
@@ -19,0 +21,0 @@ export declare function wrapContextManagerClass<ContextManagerInstance extends ContextManager>(ContextManagerClass: new (...args: unknown[]) => ContextManagerInstance): ExtendedContextManagerInstance<ContextManagerInstance>; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"contextManager.d.ts","sourceRoot":"","sources":["../../src/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAclE,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,8BAA8B,CAAC,sBAAsB,SAAS,cAAc,IAAI,KACnF,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,sBAAsB,GAAG;IAC5B,0BAA0B,IAAI,uBAAuB,CAAC;CACvD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,sBAAsB,SAAS,cAAc,EACnF,mBAAmB,EAAE,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,sBAAsB,GACtE,8BAA8B,CAAC,sBAAsB,CAAC,CAgFxD"} | ||
| {"version":3,"file":"contextManager.d.ts","sourceRoot":"","sources":["../../src/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKlE,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,8BAA8B,CAAC,sBAAsB,SAAS,cAAc,IAAI,KACnF,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,sBAAsB,GAAG;IAC5B,0BAA0B,IAAI,uBAAuB,CAAC;CACvD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,sBAAsB,SAAS,cAAc,EACnF,mBAAmB,EAAE,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,sBAAsB,GACtE,8BAA8B,CAAC,sBAAsB,CAAC,CA0CxD"} |
@@ -17,2 +17,3 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from './semanticAttributes'; | ||
| export { wrapContextManagerClass } from './contextManager'; | ||
| export { SentryAsyncLocalStorageContextManager } from './asyncLocalStorageContextManager'; | ||
| export type { AsyncLocalStorageLookup } from './contextManager'; | ||
@@ -23,4 +24,5 @@ export { SentryPropagator, shouldPropagateTraceForUrl } from './propagator'; | ||
| export { openTelemetrySetupCheck } from './utils/setupCheck'; | ||
| export { getSentryResource } from './resource'; | ||
| export { withStreamedSpan } from '@sentry/core'; | ||
| export { getClient } from '@sentry/core'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2CAA2C,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,uCAAuC,EAAE,MAAM,iDAAiD,CAAC;AAE1G,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,2CAA2C,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2CAA2C,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,uCAAuC,EAAE,MAAM,iDAAiD,CAAC;AAE1G,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,2CAA2C,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mCAAmC,CAAC;AAC1F,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"} |
@@ -17,2 +17,8 @@ import type { Context } from '@opentelemetry/api'; | ||
| * We need this to get the context from the scope in the `trace` functions. | ||
| * | ||
| * We use WeakRef to avoid a circular reference between the scope and the context. | ||
| * The context holds scopes (via SENTRY_SCOPES_CONTEXT_KEY), and if the scope held | ||
| * a strong reference back to the context, neither could be garbage collected even | ||
| * when the context is no longer reachable from application code (e.g., after a | ||
| * request completes but pooled connections retain patched callbacks). | ||
| */ | ||
@@ -22,4 +28,5 @@ export declare function setContextOnScope(scope: Scope, context: Context): void; | ||
| * Get the context related to a scope. | ||
| * Returns undefined if the context has been garbage collected (when WeakRef is used). | ||
| */ | ||
| export declare function getContextFromScope(scope: Scope): Context | undefined; | ||
| //# sourceMappingURL=contextData.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"contextData.d.ts","sourceRoot":"","sources":["../../../src/utils/contextData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAEhF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAEnF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAEtE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,CAErE"} | ||
| {"version":3,"file":"contextData.d.ts","sourceRoot":"","sources":["../../../src/utils/contextData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQ9C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAEhF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAEnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAEtE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,CAErE"} |
+2
-4
| { | ||
| "name": "@sentry/opentelemetry", | ||
| "version": "10.48.0", | ||
| "version": "10.49.0", | ||
| "description": "Official Sentry utilities for OpenTelemetry", | ||
@@ -42,7 +42,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
| "dependencies": { | ||
| "@sentry/core": "10.48.0" | ||
| "@sentry/core": "10.49.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "@opentelemetry/api": "^1.9.0", | ||
| "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", | ||
| "@opentelemetry/core": "^1.30.1 || ^2.1.0", | ||
@@ -54,3 +53,2 @@ "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", | ||
| "@opentelemetry/api": "^1.9.1", | ||
| "@opentelemetry/context-async-hooks": "^2.6.1", | ||
| "@opentelemetry/core": "^2.6.1", | ||
@@ -57,0 +55,0 @@ "@opentelemetry/sdk-trace-base": "^2.6.1", |
+3
-6
@@ -46,3 +46,3 @@ <p align="center"> | ||
| 4. Add `SentrySpanProcessor` as span processor | ||
| 5. Add a context manager wrapped via `wrapContextManagerClass` | ||
| 5. Register the Sentry context manager (`SentryAsyncLocalStorageContextManager`, or `wrapContextManagerClass` for a custom base) | ||
| 6. Add `SentryPropagator` as propagator | ||
@@ -56,2 +56,3 @@ 7. Setup OTEL-powered async context strategy for Sentry via `setOpenTelemetryContextAsyncContextStrategy()` | ||
| import { | ||
| SentryAsyncLocalStorageContextManager, | ||
| SentryPropagator, | ||
@@ -61,6 +62,4 @@ SentrySampler, | ||
| setupEventContextTrace, | ||
| wrapContextManagerClass, | ||
| setOpenTelemetryContextAsyncContextStrategy, | ||
| } from '@sentry/opentelemetry'; | ||
| import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks'; | ||
| import { context, propagation, trace } from '@opentelemetry/api'; | ||
@@ -81,8 +80,6 @@ | ||
| const SentryContextManager = wrapContextManagerClass(AsyncLocalStorageContextManager); | ||
| // Initialize the provider | ||
| trace.setGlobalTracerProvider(provider); | ||
| propagation.setGlobalPropagator(new SentryPropagator()); | ||
| context.setGlobalContextManager(new SentryContextManager()); | ||
| context.setGlobalContextManager(new SentryAsyncLocalStorageContextManager()); | ||
@@ -89,0 +86,0 @@ setOpenTelemetryContextAsyncContextStrategy(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
645832
10.26%5
-16.67%4
-20%110
8.91%5960
10.88%92
-3.16%+ Added
- Removed
- Removed
Updated