@sentry/opentelemetry 8.41.0-beta.1 → 8.42.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/build/cjs/index.js +201 -116
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +200 -117
- package/build/esm/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/asyncContextStrategy.d.ts.map +1 -1
- package/build/types/custom/client.d.ts +1 -2
- package/build/types/custom/client.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentation.d.ts +3 -0
- package/build/types/instrumentation.d.ts.map +1 -1
- package/build/types/propagator.d.ts +17 -4
- package/build/types/propagator.d.ts.map +1 -1
- package/build/types/sampler.d.ts +1 -1
- package/build/types/sampler.d.ts.map +1 -1
- package/build/types/setupEventContextTrace.d.ts +1 -1
- package/build/types/setupEventContextTrace.d.ts.map +1 -1
- package/build/types/spanExporter.d.ts +5 -7
- package/build/types/spanExporter.d.ts.map +1 -1
- package/build/types/trace.d.ts +6 -1
- package/build/types/trace.d.ts.map +1 -1
- package/build/types/types.d.ts +1 -1
- package/build/types/types.d.ts.map +1 -1
- package/build/types/utils/addOriginToSpan.d.ts +1 -1
- package/build/types/utils/addOriginToSpan.d.ts.map +1 -1
- package/build/types/utils/contextData.d.ts +1 -1
- package/build/types/utils/contextData.d.ts.map +1 -1
- package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +1 -1
- package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts.map +1 -1
- package/build/types/utils/generateSpanContextForPropagationContext.d.ts +3 -1
- package/build/types/utils/generateSpanContextForPropagationContext.d.ts.map +1 -1
- package/build/types/utils/getRequestSpanData.d.ts +1 -1
- package/build/types/utils/getRequestSpanData.d.ts.map +1 -1
- package/build/types/utils/getTraceData.d.ts +4 -2
- package/build/types/utils/getTraceData.d.ts.map +1 -1
- package/build/types/utils/makeTraceState.d.ts +1 -1
- package/build/types/utils/makeTraceState.d.ts.map +1 -1
- package/build/types/utils/mapStatus.d.ts +1 -1
- package/build/types/utils/mapStatus.d.ts.map +1 -1
- package/build/types/utils/parseSpanDescription.d.ts +1 -1
- package/build/types/utils/parseSpanDescription.d.ts.map +1 -1
- package/build/types-ts3.8/custom/client.d.ts +1 -2
- package/build/types-ts3.8/index.d.ts +2 -2
- package/build/types-ts3.8/instrumentation.d.ts +3 -0
- package/build/types-ts3.8/propagator.d.ts +17 -4
- package/build/types-ts3.8/sampler.d.ts +1 -1
- package/build/types-ts3.8/setupEventContextTrace.d.ts +1 -1
- package/build/types-ts3.8/spanExporter.d.ts +5 -7
- package/build/types-ts3.8/trace.d.ts +9 -1
- package/build/types-ts3.8/types.d.ts +1 -1
- package/build/types-ts3.8/utils/addOriginToSpan.d.ts +1 -1
- package/build/types-ts3.8/utils/contextData.d.ts +1 -1
- package/build/types-ts3.8/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +1 -1
- package/build/types-ts3.8/utils/generateSpanContextForPropagationContext.d.ts +3 -1
- package/build/types-ts3.8/utils/getRequestSpanData.d.ts +1 -1
- package/build/types-ts3.8/utils/getTraceData.d.ts +4 -2
- package/build/types-ts3.8/utils/makeTraceState.d.ts +1 -1
- package/build/types-ts3.8/utils/mapStatus.d.ts +1 -1
- package/build/types-ts3.8/utils/parseSpanDescription.d.ts +1 -1
- package/package.json +2 -3
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"8.
|
|
1
|
+
{"type":"module","version":"8.42.0","sideEffects":false}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncContextStrategy.d.ts","sourceRoot":"","sources":["../../src/asyncContextStrategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asyncContextStrategy.d.ts","sourceRoot":"","sources":["../../src/asyncContextStrategy.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAgB,2CAA2C,IAAI,IAAI,CA0FlE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BaseClient } from '@sentry/core';
|
|
2
|
-
import type { Client } from '@sentry/types';
|
|
1
|
+
import type { BaseClient, Client } from '@sentry/core';
|
|
3
2
|
import type { OpenTelemetryClient as OpenTelemetryClientInterface } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* Wrap an Client with things we need for OpenTelemetry support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/custom/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/custom/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAMpF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,SAAS,KACvB,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,EAC7B,uBAAuB,SAAS,KAC9B,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,4BAA4B,EAC5D,WAAW,EAAE,gBAAgB,GAAG,uBAAuB,CAuCxD"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ export { isSentryRequestSpan } from './utils/isSentryRequest';
|
|
|
10
10
|
export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';
|
|
11
11
|
export { generateSpanContextForPropagationContext } from './utils/generateSpanContextForPropagationContext';
|
|
12
12
|
export { getActiveSpan } from './utils/getActiveSpan';
|
|
13
|
-
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace } from './trace';
|
|
13
|
+
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace, getTraceContextForScope, } from './trace';
|
|
14
14
|
export { suppressTracing } from './utils/suppressTracing';
|
|
15
15
|
export { getCurrentHubShim } from '@sentry/core';
|
|
16
16
|
export { setupEventContextTrace } from './setupEventContextTrace';
|
|
17
17
|
export { setOpenTelemetryContextAsyncContextStrategy } from './asyncContextStrategy';
|
|
18
18
|
export { wrapContextManagerClass } from './contextManager';
|
|
19
|
-
export { SentryPropagator, getPropagationContextFromSpan } from './propagator';
|
|
19
|
+
export { SentryPropagator, getPropagationContextFromSpan, shouldPropagateTraceForUrl, } from './propagator';
|
|
20
20
|
export { SentrySpanProcessor } from './spanProcessor';
|
|
21
21
|
export { SentrySampler, wrapSamplingDecision, } from './sampler';
|
|
22
22
|
export { openTelemetrySetupCheck } from './utils/setupCheck';
|
|
@@ -1 +1 @@
|
|
|
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,iDAAi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EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -2,6 +2,9 @@ import type { Instrumentation } from '@opentelemetry/instrumentation';
|
|
|
2
2
|
/**
|
|
3
3
|
* This method takes an OpenTelemetry instrumentation or
|
|
4
4
|
* array of instrumentations and registers them with OpenTelemetry.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated This method will be removed in the next major version of the SDK.
|
|
7
|
+
* Use the `openTelemetryInstrumentations` option in `Sentry.init()` or your custom Sentry Client instead.
|
|
5
8
|
*/
|
|
6
9
|
export declare function addOpenTelemetryInstrumentation(...instrumentations: Instrumentation[]): void;
|
|
7
10
|
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,gBAAgB,EAAE,eAAe,EAAE,GAAG,IAAI,CAI5F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context, Span, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
|
|
2
2
|
import { W3CBaggagePropagator } from '@opentelemetry/core';
|
|
3
|
-
import type { continueTrace } from '@sentry/core';
|
|
4
|
-
import
|
|
3
|
+
import type { DynamicSamplingContext, Options, PropagationContext, continueTrace } from '@sentry/core';
|
|
4
|
+
import { LRUMap } from '@sentry/core';
|
|
5
5
|
/** Get the Sentry propagation context from a span context. */
|
|
6
6
|
export declare function getPropagationContextFromSpan(span: Span): PropagationContext;
|
|
7
7
|
/**
|
|
@@ -23,9 +23,22 @@ export declare class SentryPropagator extends W3CBaggagePropagator {
|
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
25
25
|
fields(): string[];
|
|
26
|
-
/** If we want to inject trace data for a given URL. */
|
|
27
|
-
private _shouldInjectTraceData;
|
|
28
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given URL should be propagated to or not.
|
|
29
|
+
* If no url is defined, or no trace propagation targets are defined, this will always return `true`.
|
|
30
|
+
* You can also optionally provide a decision map, to cache decisions and avoid repeated regex lookups.
|
|
31
|
+
*/
|
|
32
|
+
export declare function shouldPropagateTraceForUrl(url: string | undefined, tracePropagationTargets: Options['tracePropagationTargets'], decisionMap?: LRUMap<string, boolean>): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Get propagation injection data for the given context.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getInjectionData(context: Context): {
|
|
37
|
+
dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined;
|
|
38
|
+
traceId: string | undefined;
|
|
39
|
+
spanId: string | undefined;
|
|
40
|
+
sampled: boolean | undefined;
|
|
41
|
+
};
|
|
29
42
|
/**
|
|
30
43
|
* Takes trace strings and propagates them as a remote active span.
|
|
31
44
|
* This should be used in addition to `continueTrace` in OTEL-powered environments.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propagator.d.ts","sourceRoot":"","sources":["../../src/propagator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"propagator.d.ts","sourceRoot":"","sources":["../../src/propagator.ts"],"names":[],"mappings":"AAAA,OAAO,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B,yBAAyB,CAAC,CAAC,EACzC,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EAC5C,QAAQ,EAAE,MAAM,CAAC,GAChB,CAAC,CAIH"}
|
package/build/types/sampler.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Context } from '@opentelemetry/api';
|
|
|
2
2
|
import { SpanKind } from '@opentelemetry/api';
|
|
3
3
|
import type { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
|
|
4
4
|
import { SamplingDecision } from '@opentelemetry/sdk-trace-base';
|
|
5
|
-
import type { Client, SpanAttributes } from '@sentry/
|
|
5
|
+
import type { Client, SpanAttributes } from '@sentry/core';
|
|
6
6
|
/**
|
|
7
7
|
* A custom OTEL sampler that uses Sentry sampling rates to make its decision
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,OAAO,EAA2C,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,OAAO,EAA2C,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAA6B,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAe3D;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;gBAEL,MAAM,EAAE,MAAM;IAKjC,kBAAkB;IACX,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,OAAO,GACd,cAAc;IAyFjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B;AA+BD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,GACf,EAAE;IAAE,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAE,GAAG,cAAc,CAc/G"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Client } from '@sentry/
|
|
1
|
+
import type { Client } from '@sentry/core';
|
|
2
2
|
/** Ensure the `trace` context is set on all events. */
|
|
3
3
|
export declare function setupEventContextTrace(client: Client): void;
|
|
4
4
|
//# sourceMappingURL=setupEventContextTrace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupEventContextTrace.d.ts","sourceRoot":"","sources":["../../src/setupEventContextTrace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setupEventContextTrace.d.ts","sourceRoot":"","sources":["../../src/setupEventContextTrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAM3C,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAwC3D"}
|
|
@@ -4,9 +4,12 @@ import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class SentrySpanExporter {
|
|
6
6
|
private _flushTimeout;
|
|
7
|
-
private
|
|
8
|
-
private
|
|
7
|
+
private _finishedSpanBuckets;
|
|
8
|
+
private _finishedSpanBucketSize;
|
|
9
|
+
private _spansToBucketEntry;
|
|
10
|
+
private _lastCleanupTimestampInS;
|
|
9
11
|
constructor(options?: {
|
|
12
|
+
/** Lower bound of time in seconds until spans that are buffered but have not been sent as part of a transaction get cleared from memory. */
|
|
10
13
|
timeout?: number;
|
|
11
14
|
});
|
|
12
15
|
/** Export a single span. */
|
|
@@ -17,10 +20,5 @@ export declare class SentrySpanExporter {
|
|
|
17
20
|
clear(): void;
|
|
18
21
|
/** Clear the flush timeout. */
|
|
19
22
|
private _clearTimeout;
|
|
20
|
-
/**
|
|
21
|
-
* Remove any span that is older than 5min.
|
|
22
|
-
* We do this to avoid leaking memory.
|
|
23
|
-
*/
|
|
24
|
-
private _cleanupOldSpans;
|
|
25
23
|
}
|
|
26
24
|
//# sourceMappingURL=spanExporter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAqClE;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,aAAa,CAA4C;IAkBjE,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,mBAAmB,CAA4C;IACvE,OAAO,CAAC,wBAAwB,CAAS;gBAEtB,OAAO,CAAC,EAAE;QAC3B,4IAA4I;QAC5I,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAOD,4BAA4B;IACrB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAyCvC,kDAAkD;IAC3C,KAAK,IAAI,IAAI;IA2BpB,0BAA0B;IACnB,KAAK,IAAI,IAAI;IAKpB,+BAA+B;IAC/B,OAAO,CAAC,aAAa;CAMtB"}
|
package/build/types/trace.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Span } from '@opentelemetry/api';
|
|
2
|
+
import type { Client, DynamicSamplingContext, Scope, TraceContext } from '@sentry/core';
|
|
2
3
|
import { continueTrace as baseContinueTrace } from '@sentry/core';
|
|
3
|
-
import type { Scope } from '@sentry/types';
|
|
4
4
|
import type { OpenTelemetrySpanContext } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Wraps a function with a transaction/span and finishes the span after the function is done.
|
|
@@ -56,4 +56,9 @@ export declare function withActiveSpan<T>(span: Span | null, callback: (scope: S
|
|
|
56
56
|
* It propagates the trace as a remote span, in addition to setting it on the propagation context.
|
|
57
57
|
*/
|
|
58
58
|
export declare function continueTrace<T>(options: Parameters<typeof baseContinueTrace>[0], callback: () => T): T;
|
|
59
|
+
/**
|
|
60
|
+
* Get the trace context for a given scope.
|
|
61
|
+
* We have a custom implemention here because we need an OTEL-specific way to get the span from a scope.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getTraceContextForScope(client: Client, scope: Scope): [dynamicSamplingContext: Partial<DynamicSamplingContext>, traceContext: TraceContext];
|
|
59
64
|
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAoC,MAAM,oBAAoB,CAAC;AAG1F,OAAO,
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAoC,MAAM,oBAAoB,CAAC;AAG1F,OAAO,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAsB,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5G,OAAO,EAGL,aAAa,IAAI,iBAAiB,EAUnC,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAK7E;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,CA4B9F;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,GAC9C,CAAC,CA2BH;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAmBzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAGrF;AAuHD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAIvG;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACX,CAAC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAUvF"}
|
package/build/types/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Span as WriteableSpan, SpanKind, Tracer } from '@opentelemetry/api';
|
|
2
2
|
import type { BasicTracerProvider, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type { Scope, Span, StartSpanOptions } from '@sentry/
|
|
3
|
+
import type { Scope, Span, StartSpanOptions } from '@sentry/core';
|
|
4
4
|
export interface OpenTelemetryClient {
|
|
5
5
|
tracer: Tracer;
|
|
6
6
|
traceProvider: BasicTracerProvider | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAEhE,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,KAAK,CAAC;CACvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Span } from '@opentelemetry/api';
|
|
2
|
-
import type { SpanOrigin } from '@sentry/
|
|
2
|
+
import type { SpanOrigin } from '@sentry/core';
|
|
3
3
|
/** Adds an origin to an OTEL Span. */
|
|
4
4
|
export declare function addOriginToSpan(span: Span, origin: SpanOrigin): void;
|
|
5
5
|
//# sourceMappingURL=addOriginToSpan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addOriginToSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/addOriginToSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"addOriginToSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/addOriginToSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,sCAAsC;AACtC,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAEpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextData.d.ts","sourceRoot":"","sources":["../../../src/utils/contextData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
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;;;KAGK;AACL,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,CAErE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enhanceDscWithOpenTelemetryRootSpanName.d.ts","sourceRoot":"","sources":["../../../src/utils/enhanceDscWithOpenTelemetryRootSpanName.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"enhanceDscWithOpenTelemetryRootSpanName.d.ts","sourceRoot":"","sources":["../../../src/utils/enhanceDscWithOpenTelemetryRootSpanName.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkB5E"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { SpanContext } from '@opentelemetry/api';
|
|
2
|
-
import type { PropagationContext } from '@sentry/
|
|
2
|
+
import type { PropagationContext } from '@sentry/core';
|
|
3
3
|
/**
|
|
4
4
|
* Generates a SpanContext that represents a PropagationContext.
|
|
5
5
|
* This can be set on a `context` to make this a (virtual) active span.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated This function is deprecated and will be removed in the next major version.
|
|
6
8
|
*/
|
|
7
9
|
export declare function generateSpanContextForPropagationContext(propagationContext: PropagationContext): SpanContext;
|
|
8
10
|
//# sourceMappingURL=generateSpanContextForPropagationContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSpanContextForPropagationContext.d.ts","sourceRoot":"","sources":["../../../src/utils/generateSpanContextForPropagationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"generateSpanContextForPropagationContext.d.ts","sourceRoot":"","sources":["../../../src/utils/generateSpanContextForPropagationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD;;;;;GAKG;AACH,wBAAgB,wCAAwC,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,WAAW,CAkB5G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Span } from '@opentelemetry/api';
|
|
2
2
|
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type { SanitizedRequestData } from '@sentry/
|
|
3
|
+
import type { SanitizedRequestData } from '@sentry/core';
|
|
4
4
|
/**
|
|
5
5
|
* Get sanitizied request data from an OTEL span.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRequestSpanData.d.ts","sourceRoot":"","sources":["../../../src/utils/getRequestSpanData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAQlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getRequestSpanData.d.ts","sourceRoot":"","sources":["../../../src/utils/getRequestSpanData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAQlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA0C3F"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { SerializedTraceData } from '@sentry/
|
|
1
|
+
import type { SerializedTraceData, Span } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
3
|
* Otel-specific implementation of `getTraceData`.
|
|
4
4
|
* @see `@sentry/core` version of `getTraceData` for more information
|
|
5
5
|
*/
|
|
6
|
-
export declare function getTraceData(
|
|
6
|
+
export declare function getTraceData({ span }?: {
|
|
7
|
+
span?: Span;
|
|
8
|
+
}): SerializedTraceData;
|
|
7
9
|
//# sourceMappingURL=getTraceData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTraceData.d.ts","sourceRoot":"","sources":["../../../src/utils/getTraceData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getTraceData.d.ts","sourceRoot":"","sources":["../../../src/utils/getTraceData.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAI9D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAO,GAAG,mBAAmB,CAehF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeTraceState.d.ts","sourceRoot":"","sources":["../../../src/utils/makeTraceState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"makeTraceState.d.ts","sourceRoot":"","sources":["../../../src/utils/makeTraceState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAO3D;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,GAAG,EACH,OAAO,GACR,EAAE;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,UAAU,CAeb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/mapStatus.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mapStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/mapStatus.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA2B7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAsCxD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AttributeValue, Attributes } from '@opentelemetry/api';
|
|
2
2
|
import { SpanKind } from '@opentelemetry/api';
|
|
3
|
-
import type { SpanAttributes, TransactionSource } from '@sentry/
|
|
3
|
+
import type { SpanAttributes, TransactionSource } from '@sentry/core';
|
|
4
4
|
import type { AbstractSpan } from '../types';
|
|
5
5
|
interface SpanDescription {
|
|
6
6
|
op: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSpanDescription.d.ts","sourceRoot":"","sources":["../../../src/utils/parseSpanDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,QAAQ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CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAiCA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseClient } from '@sentry/core';
|
|
2
|
-
import { Client } from '@sentry/types';
|
|
1
|
+
import { BaseClient, Client } from '@sentry/core';
|
|
3
2
|
import { OpenTelemetryClient as OpenTelemetryClientInterface } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* Wrap an Client with things we need for OpenTelemetry support.
|
|
@@ -10,13 +10,13 @@ export { isSentryRequestSpan } from './utils/isSentryRequest';
|
|
|
10
10
|
export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';
|
|
11
11
|
export { generateSpanContextForPropagationContext } from './utils/generateSpanContextForPropagationContext';
|
|
12
12
|
export { getActiveSpan } from './utils/getActiveSpan';
|
|
13
|
-
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace } from './trace';
|
|
13
|
+
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace, getTraceContextForScope, } from './trace';
|
|
14
14
|
export { suppressTracing } from './utils/suppressTracing';
|
|
15
15
|
export { getCurrentHubShim } from '@sentry/core';
|
|
16
16
|
export { setupEventContextTrace } from './setupEventContextTrace';
|
|
17
17
|
export { setOpenTelemetryContextAsyncContextStrategy } from './asyncContextStrategy';
|
|
18
18
|
export { wrapContextManagerClass } from './contextManager';
|
|
19
|
-
export { SentryPropagator, getPropagationContextFromSpan } from './propagator';
|
|
19
|
+
export { SentryPropagator, getPropagationContextFromSpan, shouldPropagateTraceForUrl, } from './propagator';
|
|
20
20
|
export { SentrySpanProcessor } from './spanProcessor';
|
|
21
21
|
export { SentrySampler, wrapSamplingDecision, } from './sampler';
|
|
22
22
|
export { openTelemetrySetupCheck } from './utils/setupCheck';
|
|
@@ -2,6 +2,9 @@ import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
|
2
2
|
/**
|
|
3
3
|
* This method takes an OpenTelemetry instrumentation or
|
|
4
4
|
* array of instrumentations and registers them with OpenTelemetry.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated This method will be removed in the next major version of the SDK.
|
|
7
|
+
* Use the `openTelemetryInstrumentations` option in `Sentry.init()` or your custom Sentry Client instead.
|
|
5
8
|
*/
|
|
6
9
|
export declare function addOpenTelemetryInstrumentation(...instrumentations: Instrumentation[]): void;
|
|
7
10
|
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Span, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
|
|
2
2
|
import { W3CBaggagePropagator } from '@opentelemetry/core';
|
|
3
|
-
import { continueTrace } from '@sentry/core';
|
|
4
|
-
import {
|
|
3
|
+
import { DynamicSamplingContext, Options, PropagationContext, continueTrace } from '@sentry/core';
|
|
4
|
+
import { LRUMap } from '@sentry/core';
|
|
5
5
|
/** Get the Sentry propagation context from a span context. */
|
|
6
6
|
export declare function getPropagationContextFromSpan(span: Span): PropagationContext;
|
|
7
7
|
/**
|
|
@@ -23,9 +23,22 @@ export declare class SentryPropagator extends W3CBaggagePropagator {
|
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
25
25
|
fields(): string[];
|
|
26
|
-
/** If we want to inject trace data for a given URL. */
|
|
27
|
-
private _shouldInjectTraceData;
|
|
28
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given URL should be propagated to or not.
|
|
29
|
+
* If no url is defined, or no trace propagation targets are defined, this will always return `true`.
|
|
30
|
+
* You can also optionally provide a decision map, to cache decisions and avoid repeated regex lookups.
|
|
31
|
+
*/
|
|
32
|
+
export declare function shouldPropagateTraceForUrl(url: string | undefined, tracePropagationTargets: Options['tracePropagationTargets'], decisionMap?: LRUMap<string, boolean>): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Get propagation injection data for the given context.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getInjectionData(context: Context): {
|
|
37
|
+
dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined;
|
|
38
|
+
traceId: string | undefined;
|
|
39
|
+
spanId: string | undefined;
|
|
40
|
+
sampled: boolean | undefined;
|
|
41
|
+
};
|
|
29
42
|
/**
|
|
30
43
|
* Takes trace strings and propagates them as a remote active span.
|
|
31
44
|
* This should be used in addition to `continueTrace` in OTEL-powered environments.
|
|
@@ -2,7 +2,7 @@ import { Context } from '@opentelemetry/api';
|
|
|
2
2
|
import { SpanKind } from '@opentelemetry/api';
|
|
3
3
|
import { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
|
|
4
4
|
import { SamplingDecision } from '@opentelemetry/sdk-trace-base';
|
|
5
|
-
import { Client, SpanAttributes } from '@sentry/
|
|
5
|
+
import { Client, SpanAttributes } from '@sentry/core';
|
|
6
6
|
/**
|
|
7
7
|
* A custom OTEL sampler that uses Sentry sampling rates to make its decision
|
|
8
8
|
*/
|
|
@@ -4,9 +4,12 @@ import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class SentrySpanExporter {
|
|
6
6
|
private _flushTimeout;
|
|
7
|
-
private
|
|
8
|
-
private
|
|
7
|
+
private _finishedSpanBuckets;
|
|
8
|
+
private _finishedSpanBucketSize;
|
|
9
|
+
private _spansToBucketEntry;
|
|
10
|
+
private _lastCleanupTimestampInS;
|
|
9
11
|
constructor(options?: {
|
|
12
|
+
/** Lower bound of time in seconds until spans that are buffered but have not been sent as part of a transaction get cleared from memory. */
|
|
10
13
|
timeout?: number;
|
|
11
14
|
});
|
|
12
15
|
/** Export a single span. */
|
|
@@ -17,10 +20,5 @@ export declare class SentrySpanExporter {
|
|
|
17
20
|
clear(): void;
|
|
18
21
|
/** Clear the flush timeout. */
|
|
19
22
|
private _clearTimeout;
|
|
20
|
-
/**
|
|
21
|
-
* Remove any span that is older than 5min.
|
|
22
|
-
* We do this to avoid leaking memory.
|
|
23
|
-
*/
|
|
24
|
-
private _cleanupOldSpans;
|
|
25
23
|
}
|
|
26
24
|
//# sourceMappingURL=spanExporter.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Span } from '@opentelemetry/api';
|
|
2
|
+
import { Client, DynamicSamplingContext, Scope, TraceContext } from '@sentry/core';
|
|
2
3
|
import { continueTrace as baseContinueTrace } from '@sentry/core';
|
|
3
|
-
import { Scope } from '@sentry/types';
|
|
4
4
|
import { OpenTelemetrySpanContext } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Wraps a function with a transaction/span and finishes the span after the function is done.
|
|
@@ -56,4 +56,12 @@ export declare function withActiveSpan<T>(span: Span | null, callback: (scope: S
|
|
|
56
56
|
* It propagates the trace as a remote span, in addition to setting it on the propagation context.
|
|
57
57
|
*/
|
|
58
58
|
export declare function continueTrace<T>(options: Parameters<typeof baseContinueTrace>[0], callback: () => T): T;
|
|
59
|
+
/**
|
|
60
|
+
* Get the trace context for a given scope.
|
|
61
|
+
* We have a custom implemention here because we need an OTEL-specific way to get the span from a scope.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getTraceContextForScope(client: Client, scope: Scope): [
|
|
64
|
+
/*dynamicSamplingContext*/ Partial<DynamicSamplingContext>,
|
|
65
|
+
/*traceContext*/ TraceContext
|
|
66
|
+
];
|
|
59
67
|
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Span as WriteableSpan, SpanKind, Tracer } from '@opentelemetry/api';
|
|
2
2
|
import { BasicTracerProvider, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import { Scope, Span, StartSpanOptions } from '@sentry/
|
|
3
|
+
import { Scope, Span, StartSpanOptions } from '@sentry/core';
|
|
4
4
|
export interface OpenTelemetryClient {
|
|
5
5
|
tracer: Tracer;
|
|
6
6
|
traceProvider: BasicTracerProvider | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Span } from '@opentelemetry/api';
|
|
2
|
-
import { SpanOrigin } from '@sentry/
|
|
2
|
+
import { SpanOrigin } from '@sentry/core';
|
|
3
3
|
/** Adds an origin to an OTEL Span. */
|
|
4
4
|
export declare function addOriginToSpan(span: Span, origin: SpanOrigin): void;
|
|
5
5
|
//# sourceMappingURL=addOriginToSpan.d.ts.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SpanContext } from '@opentelemetry/api';
|
|
2
|
-
import { PropagationContext } from '@sentry/
|
|
2
|
+
import { PropagationContext } from '@sentry/core';
|
|
3
3
|
/**
|
|
4
4
|
* Generates a SpanContext that represents a PropagationContext.
|
|
5
5
|
* This can be set on a `context` to make this a (virtual) active span.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated This function is deprecated and will be removed in the next major version.
|
|
6
8
|
*/
|
|
7
9
|
export declare function generateSpanContextForPropagationContext(propagationContext: PropagationContext): SpanContext;
|
|
8
10
|
//# sourceMappingURL=generateSpanContextForPropagationContext.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Span } from '@opentelemetry/api';
|
|
2
2
|
import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import { SanitizedRequestData } from '@sentry/
|
|
3
|
+
import { SanitizedRequestData } from '@sentry/core';
|
|
4
4
|
/**
|
|
5
5
|
* Get sanitizied request data from an OTEL span.
|
|
6
6
|
*/
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { SerializedTraceData } from '@sentry/
|
|
1
|
+
import { SerializedTraceData, Span } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
3
|
* Otel-specific implementation of `getTraceData`.
|
|
4
4
|
* @see `@sentry/core` version of `getTraceData` for more information
|
|
5
5
|
*/
|
|
6
|
-
export declare function getTraceData(
|
|
6
|
+
export declare function getTraceData({ span }?: {
|
|
7
|
+
span?: Span;
|
|
8
|
+
}): SerializedTraceData;
|
|
7
9
|
//# sourceMappingURL=getTraceData.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AttributeValue, Attributes } from '@opentelemetry/api';
|
|
2
2
|
import { SpanKind } from '@opentelemetry/api';
|
|
3
|
-
import { SpanAttributes, TransactionSource } from '@sentry/
|
|
3
|
+
import { SpanAttributes, TransactionSource } from '@sentry/core';
|
|
4
4
|
import { AbstractSpan } from '../types';
|
|
5
5
|
interface SpanDescription {
|
|
6
6
|
op: string | undefined;
|