@sentry/opentelemetry 10.69.0 → 11.0.0-alpha.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/README.md +2 -15
- package/build/cjs/index.js +844 -95
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +837 -58
- package/build/esm/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/applyOtelSpanData.d.ts +1 -4
- package/build/types/applyOtelSpanData.d.ts.map +1 -1
- package/build/types/asyncContextStrategy.d.ts +2 -4
- package/build/types/asyncContextStrategy.d.ts.map +1 -1
- package/build/types/asyncLocalStorageContextManager.d.ts +16 -4
- package/build/types/asyncLocalStorageContextManager.d.ts.map +1 -1
- package/build/types/constants.d.ts +0 -10
- package/build/types/constants.d.ts.map +1 -1
- package/build/types/index.d.ts +8 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/propagator.d.ts +12 -33
- package/build/types/propagator.d.ts.map +1 -1
- package/build/types/trace.d.ts +1 -27
- package/build/types/trace.d.ts.map +1 -1
- package/build/types/tracer.d.ts.map +1 -1
- package/build/types/tracerProvider.d.ts +0 -9
- package/build/types/tracerProvider.d.ts.map +1 -1
- package/build/types/types.d.ts +2 -21
- package/build/types/types.d.ts.map +1 -1
- package/build/types/utils/TraceState.d.ts.map +1 -1
- package/build/types/utils/backfillStreamedSpanData.d.ts +1 -3
- package/build/types/utils/backfillStreamedSpanData.d.ts.map +1 -1
- package/build/types/utils/mapStatus.d.ts +0 -6
- package/build/types/utils/mapStatus.d.ts.map +1 -1
- package/build/types/utils/parseSpanDescription.d.ts +6 -30
- package/build/types/utils/parseSpanDescription.d.ts.map +1 -1
- package/build/types/utils/reconcileDscSampled.d.ts +14 -0
- package/build/types/utils/reconcileDscSampled.d.ts.map +1 -0
- package/build/types/utils/suppressTracing.d.ts +5 -4
- package/build/types/utils/suppressTracing.d.ts.map +1 -1
- package/package.json +10 -37
- package/build/cjs/asyncContextStrategy-volGaYqZ.js +0 -1892
- package/build/cjs/asyncContextStrategy-volGaYqZ.js.map +0 -1
- package/build/cjs/index.browser.js +0 -53
- package/build/cjs/index.browser.js.map +0 -1
- package/build/esm/asyncContextStrategy-jD8YWNDU.js +0 -1857
- package/build/esm/asyncContextStrategy-jD8YWNDU.js.map +0 -1
- package/build/esm/index.browser.js +0 -14
- package/build/esm/index.browser.js.map +0 -1
- package/build/types/contextManager.d.ts +0 -22
- package/build/types/contextManager.d.ts.map +0 -1
- package/build/types/custom/client.d.ts +0 -12
- package/build/types/custom/client.d.ts.map +0 -1
- package/build/types/exports.d.ts +0 -27
- package/build/types/exports.d.ts.map +0 -1
- package/build/types/index.browser.d.ts +0 -10
- package/build/types/index.browser.d.ts.map +0 -1
- package/build/types/nodeAsyncContextStrategy.d.ts +0 -4
- package/build/types/nodeAsyncContextStrategy.d.ts.map +0 -1
- package/build/types/resource.d.ts +0 -26
- package/build/types/resource.d.ts.map +0 -1
- package/build/types/sampler.d.ts +0 -32
- package/build/types/sampler.d.ts.map +0 -1
- package/build/types/semanticAttributes.d.ts +0 -4
- package/build/types/semanticAttributes.d.ts.map +0 -1
- package/build/types/spanExporter.d.ts +0 -50
- package/build/types/spanExporter.d.ts.map +0 -1
- package/build/types/spanProcessor.d.ts +0 -31
- package/build/types/spanProcessor.d.ts.map +0 -1
- package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +0 -7
- package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts.map +0 -1
- package/build/types/utils/getParentSpanId.d.ts +0 -8
- package/build/types/utils/getParentSpanId.d.ts.map +0 -1
- package/build/types/utils/getRequestSpanData.d.ts +0 -8
- package/build/types/utils/getRequestSpanData.d.ts.map +0 -1
- package/build/types/utils/getSpanKind.d.ts +0 -10
- package/build/types/utils/getSpanKind.d.ts.map +0 -1
- package/build/types/utils/getTraceData.d.ts +0 -12
- package/build/types/utils/getTraceData.d.ts.map +0 -1
- package/build/types/utils/groupSpansWithParents.d.ts +0 -17
- package/build/types/utils/groupSpansWithParents.d.ts.map +0 -1
- package/build/types/utils/isSentryRequest.d.ts +0 -8
- package/build/types/utils/isSentryRequest.d.ts.map +0 -1
- package/build/types/utils/setupCheck.d.ts +0 -9
- package/build/types/utils/setupCheck.d.ts.map +0 -1
- package/build/types/utils/spanTypes.d.ts +0 -52
- package/build/types/utils/spanTypes.d.ts.map +0 -1
- package/build/types-ts3.8/applyOtelSpanData.d.ts +0 -18
- package/build/types-ts3.8/asyncContextStrategy.d.ts +0 -9
- package/build/types-ts3.8/asyncLocalStorageContextManager.d.ts +0 -31
- package/build/types-ts3.8/constants.d.ts +0 -24
- package/build/types-ts3.8/contextManager.d.ts +0 -22
- package/build/types-ts3.8/custom/client.d.ts +0 -12
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/exports.d.ts +0 -27
- package/build/types-ts3.8/index.browser.d.ts +0 -10
- package/build/types-ts3.8/index.d.ts +0 -5
- package/build/types-ts3.8/nodeAsyncContextStrategy.d.ts +0 -4
- package/build/types-ts3.8/propagator.d.ts +0 -43
- package/build/types-ts3.8/resource.d.ts +0 -29
- package/build/types-ts3.8/sampler.d.ts +0 -32
- package/build/types-ts3.8/semanticAttributes.d.ts +0 -4
- package/build/types-ts3.8/setupEventContextTrace.d.ts +0 -4
- package/build/types-ts3.8/spanExporter.d.ts +0 -50
- package/build/types-ts3.8/spanProcessor.d.ts +0 -31
- package/build/types-ts3.8/trace.d.ts +0 -75
- package/build/types-ts3.8/tracer.d.ts +0 -13
- package/build/types-ts3.8/tracerProvider.d.ts +0 -23
- package/build/types-ts3.8/types.d.ts +0 -29
- package/build/types-ts3.8/utils/TraceState.d.ts +0 -21
- package/build/types-ts3.8/utils/backfillStreamedSpanData.d.ts +0 -16
- package/build/types-ts3.8/utils/buildContextWithSentryScopes.d.ts +0 -12
- package/build/types-ts3.8/utils/contextData.d.ts +0 -30
- package/build/types-ts3.8/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +0 -7
- package/build/types-ts3.8/utils/getActiveSpan.d.ts +0 -6
- package/build/types-ts3.8/utils/getParentSpanId.d.ts +0 -8
- package/build/types-ts3.8/utils/getRequestSpanData.d.ts +0 -8
- package/build/types-ts3.8/utils/getSamplingDecision.d.ts +0 -27
- package/build/types-ts3.8/utils/getSpanKind.d.ts +0 -10
- package/build/types-ts3.8/utils/getTraceData.d.ts +0 -12
- package/build/types-ts3.8/utils/groupSpansWithParents.d.ts +0 -17
- package/build/types-ts3.8/utils/isSentryRequest.d.ts +0 -8
- package/build/types-ts3.8/utils/makeTraceState.d.ts +0 -10
- package/build/types-ts3.8/utils/mapStatus.d.ts +0 -9
- package/build/types-ts3.8/utils/parseSpanDescription.d.ts +0 -56
- package/build/types-ts3.8/utils/setupCheck.d.ts +0 -9
- package/build/types-ts3.8/utils/spanTypes.d.ts +0 -52
- package/build/types-ts3.8/utils/suppressTracing.d.ts +0 -5
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './exports';
|
|
2
|
-
export declare class SentryAsyncLocalStorageContextManager {
|
|
3
|
-
constructor();
|
|
4
|
-
}
|
|
5
|
-
export { setOpenTelemetryContextAsyncContextStrategy } from './asyncContextStrategy';
|
|
6
|
-
export type AsyncLocalStorageLookup = {
|
|
7
|
-
asyncLocalStorage: unknown;
|
|
8
|
-
contextSymbol: symbol;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.browser.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAC;AAG1B,qBAAa,qCAAqC;;CAOjD;AAGD,OAAO,EAAE,2CAA2C,EAAE,MAAM,wBAAwB,CAAC;AAErF,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodeAsyncContextStrategy.d.ts","sourceRoot":"","sources":["../../src/nodeAsyncContextStrategy.ts"],"names":[],"mappings":"AAgBA,wBAAgB,+CAA+C,CAAC,OAAO,CAAC,EAAE;IAAE,sBAAsB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAMpH"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Attributes, AttributeValue } from '@opentelemetry/api';
|
|
2
|
-
type RawResourceAttribute = [string, AttributeValue | undefined];
|
|
3
|
-
/**
|
|
4
|
-
* Minimal Resource implementation that satisfies the OpenTelemetry Resource interface
|
|
5
|
-
* used by BasicTracerProvider, without depending on `@opentelemetry/resources`.
|
|
6
|
-
*/
|
|
7
|
-
declare class SentryResource {
|
|
8
|
-
private _attributes;
|
|
9
|
-
constructor(attributes: Attributes);
|
|
10
|
-
get attributes(): Attributes;
|
|
11
|
-
merge(other: SentryResource | null): SentryResource;
|
|
12
|
-
getRawAttributes(): RawResourceAttribute[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Returns a Resource for use in Sentry's OpenTelemetry TracerProvider setup.
|
|
16
|
-
*
|
|
17
|
-
* Combines the default OTel SDK telemetry attributes with Sentry-specific
|
|
18
|
-
* service attributes, equivalent to what was previously done via:
|
|
19
|
-
* `defaultResource().merge(resourceFromAttributes({ ... }))`
|
|
20
|
-
*
|
|
21
|
-
* Respects OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES environment variables
|
|
22
|
-
* per the OpenTelemetry specification.
|
|
23
|
-
*/
|
|
24
|
-
export declare function getSentryResource(serviceNameFallback: string): SentryResource;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAerE,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;AA6BD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,mBAAmB,EAAE,MAAM,GAAG,cAAc,CAoB7E"}
|
package/build/types/sampler.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Context } from '@opentelemetry/api';
|
|
2
|
-
import { SpanKind } from '@opentelemetry/api';
|
|
3
|
-
import type { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
|
|
4
|
-
import { SamplingDecision } from '@opentelemetry/sdk-trace-base';
|
|
5
|
-
import type { Client, SpanAttributes } from '@sentry/core';
|
|
6
|
-
/**
|
|
7
|
-
* A custom OTEL sampler that uses Sentry sampling rates to make its decision
|
|
8
|
-
*/
|
|
9
|
-
export declare class SentrySampler implements Sampler {
|
|
10
|
-
private _client;
|
|
11
|
-
private _isSpanStreaming;
|
|
12
|
-
constructor(client: Client);
|
|
13
|
-
/** @inheritDoc */
|
|
14
|
-
shouldSample(context: Context, traceId: string, spanName: string, spanKind: SpanKind, spanAttributes: SpanAttributes, _links: unknown): SamplingResult;
|
|
15
|
-
/** Returns the sampler name or short description with the configuration. */
|
|
16
|
-
toString(): string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Wrap a sampling decision with data that Sentry needs to work properly with it.
|
|
20
|
-
* If you pass `decision: undefined`, it will be treated as `NOT_RECORDING`, but in contrast to passing `NOT_RECORDING`
|
|
21
|
-
* it will not propagate this decision to downstream Sentry SDKs.
|
|
22
|
-
*/
|
|
23
|
-
export declare function wrapSamplingDecision({ decision, context, spanAttributes, sampleRand, downstreamTraceSampleRate, ignoredChildSpan, ignoredSegmentSpan, }: {
|
|
24
|
-
decision: SamplingDecision | undefined;
|
|
25
|
-
context: Context;
|
|
26
|
-
spanAttributes: SpanAttributes;
|
|
27
|
-
sampleRand?: number;
|
|
28
|
-
downstreamTraceSampleRate?: number;
|
|
29
|
-
ignoredChildSpan?: boolean;
|
|
30
|
-
ignoredSegmentSpan?: boolean;
|
|
31
|
-
}): SamplingResult;
|
|
32
|
-
//# sourceMappingURL=sampler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAA2C,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAsB,QAAQ,EAAS,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA4B3D;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAU;gBAEf,MAAM,EAAE,MAAM;IAMjC,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;IAoLjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B;AAuBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,cAAc,CAkCjB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** If this attribute is true, it means that the parent is a remote span. */
|
|
2
|
-
export declare const SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = "sentry.parentIsRemote";
|
|
3
|
-
export declare const SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION = "sentry.graphql.operation";
|
|
4
|
-
//# sourceMappingURL=semanticAttributes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticAttributes.d.ts","sourceRoot":"","sources":["../../src/semanticAttributes.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,eAAO,MAAM,0CAA0C,0BAA0B,CAAC;AAGlF,eAAO,MAAM,2CAA2C,6BAA6B,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
2
|
-
import type { TransactionEvent } from '@sentry/core';
|
|
3
|
-
/**
|
|
4
|
-
* A Sentry-specific exporter that converts OpenTelemetry Spans to Sentry Spans & Transactions.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SentrySpanExporter {
|
|
7
|
-
private _finishedSpanBuckets;
|
|
8
|
-
private _finishedSpanBucketSize;
|
|
9
|
-
private _spansToBucketEntry;
|
|
10
|
-
private _lastCleanupTimestampInS;
|
|
11
|
-
private _sentSpans;
|
|
12
|
-
private _debouncedFlush;
|
|
13
|
-
constructor(options?: {
|
|
14
|
-
/** 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. */
|
|
15
|
-
timeout?: number;
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Export a single span.
|
|
19
|
-
* This is called by the span processor whenever a span is ended.
|
|
20
|
-
*/
|
|
21
|
-
export(span: ReadableSpan): void;
|
|
22
|
-
/**
|
|
23
|
-
* Try to flush any pending spans immediately.
|
|
24
|
-
* This is called internally by the exporter (via _debouncedFlush),
|
|
25
|
-
* but can also be triggered externally if we force-flush.
|
|
26
|
-
*/
|
|
27
|
-
flush(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Clear the exporter.
|
|
30
|
-
* This is called when the span processor is shut down.
|
|
31
|
-
*/
|
|
32
|
-
clear(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Send the given spans, but only if they are part of a finished transaction.
|
|
35
|
-
*
|
|
36
|
-
* Returns the sent spans.
|
|
37
|
-
* Spans remain unsent when their parent span is not yet finished.
|
|
38
|
-
* This will happen regularly, as child spans are generally finished before their parents.
|
|
39
|
-
* But it _could_ also happen because, for whatever reason, a parent span was lost.
|
|
40
|
-
* In this case, we'll eventually need to clean this up.
|
|
41
|
-
*/
|
|
42
|
-
private _maybeSend;
|
|
43
|
-
/** Check if a node is a completed root node or a node whose parent has already been sent */
|
|
44
|
-
private _nodeIsCompletedRootNodeOrHasSentParent;
|
|
45
|
-
/** Get all completed root nodes from a list of nodes */
|
|
46
|
-
private _getCompletedRootNodes;
|
|
47
|
-
}
|
|
48
|
-
/** Exported only for tests. */
|
|
49
|
-
export declare function createTransactionForOtelSpan(span: ReadableSpan): TransactionEvent;
|
|
50
|
-
//# sourceMappingURL=spanExporter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAKV,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAuCtB;;GAEG;AACH,qBAAa,kBAAkB;IAiB7B,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,mBAAmB,CAA4C;IACvE,OAAO,CAAC,wBAAwB,CAAS;IACzC,OAAO,CAAC,UAAU,CAAyB;IAE3C,OAAO,CAAC,eAAe,CAA8B;gBAElC,OAAO,CAAC,EAAE;QAC3B,4IAA4I;QAC5I,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IASD;;;OAGG;IACI,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAoCvC;;;;OAIG;IACI,KAAK,IAAI,IAAI;IA0BpB;;;OAGG;IACI,KAAK,IAAI,IAAI;IAMpB;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IAsDlB,4FAA4F;IAC5F,OAAO,CAAC,uCAAuC;IAI/C,wDAAwD;IACxD,OAAO,CAAC,sBAAsB;CAK/B;AAYD,+BAA+B;AAC/B,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAoEjF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Context } from '@opentelemetry/api';
|
|
2
|
-
import type { ReadableSpan, Span, SpanProcessor as SpanProcessorInterface } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type { Client } from '@sentry/core';
|
|
4
|
-
/**
|
|
5
|
-
* Converts OpenTelemetry Spans to Sentry Spans and sends them to Sentry via
|
|
6
|
-
* the Sentry SDK.
|
|
7
|
-
*/
|
|
8
|
-
export declare class SentrySpanProcessor implements SpanProcessorInterface {
|
|
9
|
-
private _exporter;
|
|
10
|
-
private _client;
|
|
11
|
-
private _unsubscribePreprocessSpan;
|
|
12
|
-
constructor(options?: {
|
|
13
|
-
timeout?: number;
|
|
14
|
-
client?: Client;
|
|
15
|
-
});
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
forceFlush(): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
shutdown(): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
onStart(span: Span, parentContext: Context): void;
|
|
28
|
-
/** @inheritDoc */
|
|
29
|
-
onEnd(span: Span & ReadableSpan): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=spanProcessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spanProcessor.d.ts","sourceRoot":"","sources":["../../src/spanProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAgB3C;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,0BAA0B,CAAuC;gBAEtD,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAclE;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;IAmCxD,kBAAkB;IACX,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,IAAI;CAW9C"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Client } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Setup a DSC handler on the passed client,
|
|
4
|
-
* ensuring that the transaction name is inferred from the span correctly.
|
|
5
|
-
*/
|
|
6
|
-
export declare function enhanceDscWithOpenTelemetryRootSpanName(client: Client): void;
|
|
7
|
-
//# sourceMappingURL=enhanceDscWithOpenTelemetryRootSpanName.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanceDscWithOpenTelemetryRootSpanName.d.ts","sourceRoot":"","sources":["../../../src/utils/enhanceDscWithOpenTelemetryRootSpanName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAK3C;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAiC5E"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
2
|
-
/**
|
|
3
|
-
* Get the parent span id from a span.
|
|
4
|
-
* In OTel v1, the parent span id is accessed as `parentSpanId`
|
|
5
|
-
* In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`
|
|
6
|
-
*/
|
|
7
|
-
export declare function getParentSpanId(span: ReadableSpan): string | undefined;
|
|
8
|
-
//# sourceMappingURL=getParentSpanId.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getParentSpanId.d.ts","sourceRoot":"","sources":["../../../src/utils/getParentSpanId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAQtE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Span } from '@opentelemetry/api';
|
|
2
|
-
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type { SanitizedRequestData } from '@sentry/core';
|
|
4
|
-
/**
|
|
5
|
-
* Get sanitizied request data from an OTEL span.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getRequestSpanData(span: Span | ReadableSpan): Partial<SanitizedRequestData>;
|
|
8
|
-
//# sourceMappingURL=getRequestSpanData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAElE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAsC3F"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SpanKind } from '@opentelemetry/api';
|
|
2
|
-
import type { AbstractSpan } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Get the span kind from a span.
|
|
5
|
-
* For whatever reason, this is not public API on the generic "Span" type,
|
|
6
|
-
* so we need to check if we actually have a `SDKTraceBaseSpan` where we can fetch this from.
|
|
7
|
-
* Otherwise, we fall back to `SpanKind.INTERNAL`.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getSpanKind(span: AbstractSpan): SpanKind;
|
|
10
|
-
//# sourceMappingURL=getSpanKind.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getSpanKind.d.ts","sourceRoot":"","sources":["../../../src/utils/getSpanKind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAMxD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Client, Scope, SerializedTraceData, Span } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Otel-specific implementation of `getTraceData`.
|
|
4
|
-
* @see `@sentry/core` version of `getTraceData` for more information
|
|
5
|
-
*/
|
|
6
|
-
export declare function getTraceData({ span, scope, client, propagateTraceparent, }?: {
|
|
7
|
-
span?: Span;
|
|
8
|
-
scope?: Scope;
|
|
9
|
-
client?: Client;
|
|
10
|
-
propagateTraceparent?: boolean;
|
|
11
|
-
}): SerializedTraceData;
|
|
12
|
-
//# sourceMappingURL=getTraceData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTraceData.d.ts","sourceRoot":"","sources":["../../../src/utils/getTraceData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAU7E;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,MAAM,EACN,oBAAoB,GACrB,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,mBAAmB,CAqB5G"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
2
|
-
export interface SpanNode {
|
|
3
|
-
id: string;
|
|
4
|
-
span?: ReadableSpan;
|
|
5
|
-
parentNode?: SpanNode | undefined;
|
|
6
|
-
children: SpanNode[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* This function runs through a list of OTEL Spans, and wraps them in an `SpanNode`
|
|
10
|
-
* where each node holds a reference to their parent node.
|
|
11
|
-
*/
|
|
12
|
-
export declare function groupSpansWithParents(spans: ReadableSpan[]): SpanNode[];
|
|
13
|
-
/**
|
|
14
|
-
* This returns the _local_ parent ID - `parentId` on the span may point to a remote span.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getLocalParentId(span: ReadableSpan): string | undefined;
|
|
17
|
-
//# sourceMappingURL=groupSpansWithParents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groupSpansWithParents.d.ts","sourceRoot":"","sources":["../../../src/utils/groupSpansWithParents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAIlE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAUvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAKvE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AbstractSpan } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param otelSpan Checks whether a given OTEL Span is an http request to sentry.
|
|
5
|
-
* @returns boolean
|
|
6
|
-
*/
|
|
7
|
-
export declare function isSentryRequestSpan(span: AbstractSpan): boolean;
|
|
8
|
-
//# sourceMappingURL=isSentryRequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isSentryRequest.d.ts","sourceRoot":"","sources":["../../../src/utils/isSentryRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAgB/D"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type OpenTelemetryElement = 'SentrySpanProcessor' | 'SentryContextManager' | 'SentryPropagator' | 'SentrySampler' | 'SentryTracerProvider';
|
|
2
|
-
/** Get all the OpenTelemetry elements that have been set up. */
|
|
3
|
-
export declare function openTelemetrySetupCheck(): OpenTelemetryElement[];
|
|
4
|
-
/** Mark an OpenTelemetry element as setup. */
|
|
5
|
-
export declare function setIsSetup(element: OpenTelemetryElement): void;
|
|
6
|
-
/** Only exported for tests. */
|
|
7
|
-
export declare function clearOpenTelemetrySetupCheck(): void;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=setupCheck.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupCheck.d.ts","sourceRoot":"","sources":["../../../src/utils/setupCheck.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,CAAC;AAI3B,gEAAgE;AAChE,wBAAgB,uBAAuB,IAAI,oBAAoB,EAAE,CAEhE;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAE9D;AAED,+BAA+B;AAC/B,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { SpanKind, SpanStatus } from '@opentelemetry/api';
|
|
2
|
-
import type { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type { AbstractSpan } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Check if a given span has attributes.
|
|
6
|
-
* This is necessary because the base `Span` type does not have attributes,
|
|
7
|
-
* so in places where we are passed a generic span, we need to check if we want to access them.
|
|
8
|
-
*/
|
|
9
|
-
export declare function spanHasAttributes<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
10
|
-
attributes: ReadableSpan['attributes'];
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Check if a given span has a kind.
|
|
14
|
-
* This is necessary because the base `Span` type does not have a kind,
|
|
15
|
-
* so in places where we are passed a generic span, we need to check if we want to access it.
|
|
16
|
-
*/
|
|
17
|
-
export declare function spanHasKind<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
18
|
-
kind: SpanKind;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Check if a given span has a status.
|
|
22
|
-
* This is necessary because the base `Span` type does not have a status,
|
|
23
|
-
* so in places where we are passed a generic span, we need to check if we want to access it.
|
|
24
|
-
*/
|
|
25
|
-
export declare function spanHasStatus<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
26
|
-
status: SpanStatus;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Check if a given span has a name.
|
|
30
|
-
* This is necessary because the base `Span` type does not have a name,
|
|
31
|
-
* so in places where we are passed a generic span, we need to check if we want to access it.
|
|
32
|
-
*/
|
|
33
|
-
export declare function spanHasName<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
34
|
-
name: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Check if a given span has a kind.
|
|
38
|
-
* This is necessary because the base `Span` type does not have a kind,
|
|
39
|
-
* so in places where we are passed a generic span, we need to check if we want to access it.
|
|
40
|
-
*/
|
|
41
|
-
export declare function spanHasParentId<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
42
|
-
parentSpanId: string;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Check if a given span has events.
|
|
46
|
-
* This is necessary because the base `Span` type does not have events,
|
|
47
|
-
* so in places where we are passed a generic span, we need to check if we want to access it.
|
|
48
|
-
*/
|
|
49
|
-
export declare function spanHasEvents<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
|
|
50
|
-
events: TimedEvent[];
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=spanTypes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spanTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/spanTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,YAAY,EAC7D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;CAAE,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAGhH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAG3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAG9G;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,YAAY,EAC3D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAG7C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAG7C"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SpanKind } from '@opentelemetry/api';
|
|
2
|
-
import { Span } from '@sentry/core';
|
|
3
|
-
/**
|
|
4
|
-
* Backfill a native Sentry span with the data the OpenTelemetry SDK pipeline would otherwise derive
|
|
5
|
-
* from OTel semantic attributes: `sentry.op`, `sentry.source`, the span name, `otel.kind`, and status.
|
|
6
|
-
*
|
|
7
|
-
* On the OTel SDK provider this happens in the `SentrySpanProcessor`/`SentrySpanExporter` while
|
|
8
|
-
* converting `ReadableSpan`s to Sentry payloads (via `parseSpanDescription` + `mapStatus`).
|
|
9
|
-
* `SentryTracerProvider` creates native Sentry spans directly and never goes through that pipeline,
|
|
10
|
-
* so the same inference has to run here instead — once at span start, and again at span end
|
|
11
|
-
* (`finalizeStatus`, once attributes like `http.route` and the status code are available).
|
|
12
|
-
*/
|
|
13
|
-
export declare function applyOtelSpanData(span: Span, options?: {
|
|
14
|
-
finalizeStatus?: boolean;
|
|
15
|
-
}): void;
|
|
16
|
-
/** Stash the OTel span kind on a Sentry span so {@link applyOtelSpanData} can read it. */
|
|
17
|
-
export declare function applyOtelSpanKind(span: Span, kind: SpanKind | undefined): void;
|
|
18
|
-
//# sourceMappingURL=applyOtelSpanData.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TracingChannelBinding } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Sets the async context strategy to use follow the OTEL context under the hood.
|
|
4
|
-
* We handle forking a hub inside of our custom OTEL Context Manager (./otelContextManager.ts)
|
|
5
|
-
*/
|
|
6
|
-
export declare function setOpenTelemetryContextAsyncContextStrategy(options?: {
|
|
7
|
-
getTracingChannelBinding?: () => TracingChannelBinding | undefined;
|
|
8
|
-
}): void;
|
|
9
|
-
//# sourceMappingURL=asyncContextStrategy.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Context, ContextManager } from '@opentelemetry/api';
|
|
2
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
-
import { AsyncLocalStorageLookup } from './contextManager';
|
|
4
|
-
/**
|
|
5
|
-
* OpenTelemetry-compatible context manager using Node.js `AsyncLocalStorage`.
|
|
6
|
-
* Semantics match `@opentelemetry/context-async-hooks` (function `bind` + `EventEmitter` patching).
|
|
7
|
-
*/
|
|
8
|
-
export declare class SentryAsyncLocalStorageContextManager implements ContextManager {
|
|
9
|
-
protected readonly _asyncLocalStorage: AsyncLocalStorage<Context>;
|
|
10
|
-
private readonly _kOtListeners;
|
|
11
|
-
private _wrapped;
|
|
12
|
-
constructor();
|
|
13
|
-
active(): Context;
|
|
14
|
-
with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(context: Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
15
|
-
enable(): this;
|
|
16
|
-
disable(): this;
|
|
17
|
-
bind<T>(context: Context, target: T): T;
|
|
18
|
-
/**
|
|
19
|
-
* Gets underlying AsyncLocalStorage and symbol to allow lookup of scope.
|
|
20
|
-
* This is Sentry-specific.
|
|
21
|
-
*/
|
|
22
|
-
getAsyncLocalStorageLookup(): AsyncLocalStorageLookup;
|
|
23
|
-
private _bindFunction;
|
|
24
|
-
private _bindEventEmitter;
|
|
25
|
-
private _patchRemoveListener;
|
|
26
|
-
private _patchRemoveAllListeners;
|
|
27
|
-
private _patchAddListener;
|
|
28
|
-
private _createPatchMap;
|
|
29
|
-
private _getPatchMap;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=asyncLocalStorageContextManager.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const SENTRY_TRACE_HEADER = "sentry-trace";
|
|
2
|
-
export declare const SENTRY_BAGGAGE_HEADER = "baggage";
|
|
3
|
-
export declare const SENTRY_TRACE_STATE_DSC = "sentry.dsc";
|
|
4
|
-
export declare const SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING = "sentry.sampled_not_recording";
|
|
5
|
-
export declare const SENTRY_TRACE_STATE_URL = "sentry.url";
|
|
6
|
-
export declare const SENTRY_TRACE_STATE_SAMPLE_RAND = "sentry.sample_rand";
|
|
7
|
-
export declare const SENTRY_TRACE_STATE_SAMPLE_RATE = "sentry.sample_rate";
|
|
8
|
-
/**
|
|
9
|
-
* A flag marking a context as ignored because the span associated with the context
|
|
10
|
-
* is ignored (`ignoreSpans` filter).
|
|
11
|
-
*/
|
|
12
|
-
export declare const SENTRY_TRACE_STATE_CHILD_IGNORED = "sentry.ignored";
|
|
13
|
-
/**
|
|
14
|
-
* A flag marking a segment span as ignored because it matched the `ignoreSpans` filter.
|
|
15
|
-
* Unlike `SENTRY_TRACE_STATE_CHILD_IGNORED` (used for child spans), this flag is NOT consumed
|
|
16
|
-
* by the context manager for re-parenting. Instead, it propagates to child spans so they
|
|
17
|
-
* can record the correct client report outcome (`ignored` instead of `sample_rate`).
|
|
18
|
-
*/
|
|
19
|
-
export declare const SENTRY_TRACE_STATE_SEGMENT_IGNORED = "sentry.segment_ignored";
|
|
20
|
-
export declare const SENTRY_SCOPES_CONTEXT_KEY: symbol;
|
|
21
|
-
export declare const SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY: symbol;
|
|
22
|
-
export declare const SENTRY_FORK_SET_SCOPE_CONTEXT_KEY: symbol;
|
|
23
|
-
export declare const SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY: symbol;
|
|
24
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import { ContextManager } from '@opentelemetry/api';
|
|
3
|
-
export type AsyncLocalStorageLookup = {
|
|
4
|
-
asyncLocalStorage: AsyncLocalStorage<unknown>;
|
|
5
|
-
contextSymbol: symbol;
|
|
6
|
-
};
|
|
7
|
-
type ExtendedContextManagerInstance<ContextManagerInstance extends ContextManager> = new (...args: unknown[]) => ContextManagerInstance & {
|
|
8
|
-
getAsyncLocalStorageLookup(): AsyncLocalStorageLookup;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Wrap an OpenTelemetry ContextManager in a way that ensures the context is kept in sync with the Sentry Scope.
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
15
|
-
* const SentryContextManager = wrapContextManagerClass(AsyncLocalStorageContextManager);
|
|
16
|
-
* const contextManager = new SentryContextManager();
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Use {@link SentryAsyncLocalStorageContextManager} instead.
|
|
19
|
-
*/
|
|
20
|
-
export declare function wrapContextManagerClass<ContextManagerInstance extends ContextManager>(ContextManagerClass: new (...args: unknown[]) => ContextManagerInstance): ExtendedContextManagerInstance<ContextManagerInstance>;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=contextManager.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Client } from '@sentry/core';
|
|
2
|
-
import { OpenTelemetryClient as OpenTelemetryClientInterface } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Wrap an Client class with things we need for OpenTelemetry support.
|
|
5
|
-
* Make sure that the Client class passed in is non-abstract!
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* const OpenTelemetryClient = getWrappedClientClass(NodeClient);
|
|
9
|
-
* const client = new OpenTelemetryClient(options);
|
|
10
|
-
*/
|
|
11
|
-
export declare function wrapClientClass<ClassConstructor extends new (...args: any[]) => Client, WrappedClassConstructor extends new (...args: any[]) => Client & OpenTelemetryClientInterface>(ClientClass: ClassConstructor): WrappedClassConstructor;
|
|
12
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
|
|
3
|
-
*
|
|
4
|
-
* ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEBUG_BUILD: boolean;
|
|
7
|
-
//# sourceMappingURL=debug-build.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from './semanticAttributes';
|
|
2
|
-
export { getRequestSpanData } from './utils/getRequestSpanData';
|
|
3
|
-
export { OpenTelemetryClient } from './types';
|
|
4
|
-
export { wrapClientClass } from './custom/client';
|
|
5
|
-
export { getSpanKind } from './utils/getSpanKind';
|
|
6
|
-
export { getScopesFromContext } from './utils/contextData';
|
|
7
|
-
export { spanHasAttributes, spanHasEvents, spanHasKind, spanHasName, spanHasParentId, spanHasStatus, } from './utils/spanTypes';
|
|
8
|
-
export { getDynamicSamplingContextFromSpan } from '@sentry/core';
|
|
9
|
-
export { isSentryRequestSpan } from './utils/isSentryRequest';
|
|
10
|
-
export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';
|
|
11
|
-
export { getActiveSpan } from './utils/getActiveSpan';
|
|
12
|
-
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace, getTraceContextForScope, } from './trace';
|
|
13
|
-
export { suppressTracing } from './utils/suppressTracing';
|
|
14
|
-
export { setupEventContextTrace } from './setupEventContextTrace';
|
|
15
|
-
export { wrapContextManagerClass } from './contextManager';
|
|
16
|
-
export { SentryPropagator, shouldPropagateTraceForUrl } from './propagator';
|
|
17
|
-
export { SentrySpanProcessor } from './spanProcessor';
|
|
18
|
-
export { SentrySampler, wrapSamplingDecision } from './sampler';
|
|
19
|
-
export { applyOtelSpanData } from './applyOtelSpanData';
|
|
20
|
-
export { backfillStreamedSpanDataFromOtel } from './utils/backfillStreamedSpanData';
|
|
21
|
-
export { SentryTracerProvider } from './tracerProvider';
|
|
22
|
-
export { OpenTelemetryTracerProvider } from './types';
|
|
23
|
-
export { openTelemetrySetupCheck, setIsSetup } from './utils/setupCheck';
|
|
24
|
-
export { getSentryResource } from './resource';
|
|
25
|
-
export { withStreamedSpan } from '@sentry/core';
|
|
26
|
-
export { getClient } from '@sentry/core';
|
|
27
|
-
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './exports';
|
|
2
|
-
export declare class SentryAsyncLocalStorageContextManager {
|
|
3
|
-
constructor();
|
|
4
|
-
}
|
|
5
|
-
export { setOpenTelemetryContextAsyncContextStrategy } from './asyncContextStrategy';
|
|
6
|
-
export type AsyncLocalStorageLookup = {
|
|
7
|
-
asyncLocalStorage: unknown;
|
|
8
|
-
contextSymbol: symbol;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './exports';
|
|
2
|
-
export { SentryAsyncLocalStorageContextManager } from './asyncLocalStorageContextManager';
|
|
3
|
-
export { AsyncLocalStorageLookup } from './contextManager';
|
|
4
|
-
export { setNodeOpenTelemetryContextAsyncContextStrategy as setOpenTelemetryContextAsyncContextStrategy } from './nodeAsyncContextStrategy';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Context, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
|
|
2
|
-
import { W3CBaggagePropagator } from '@opentelemetry/core';
|
|
3
|
-
import { Client, continueTrace, DynamicSamplingContext, Scope } from '@sentry/core';
|
|
4
|
-
/**
|
|
5
|
-
* Injects and extracts `sentry-trace` and `baggage` headers from carriers.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SentryPropagator extends W3CBaggagePropagator {
|
|
8
|
-
/** A map of URLs that have already been checked for if they match tracePropagationTargets. */
|
|
9
|
-
private _urlMatchesTargetsMap;
|
|
10
|
-
constructor();
|
|
11
|
-
/**
|
|
12
|
-
* @inheritDoc
|
|
13
|
-
*/
|
|
14
|
-
inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
|
|
15
|
-
/**
|
|
16
|
-
* @inheritDoc
|
|
17
|
-
*/
|
|
18
|
-
extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
fields(): string[];
|
|
23
|
-
}
|
|
24
|
-
export { shouldPropagateTraceForUrl } from '@sentry/core';
|
|
25
|
-
/**
|
|
26
|
-
* Get propagation injection data for the given context.
|
|
27
|
-
* The additional options can be passed to override the scope and client that is otherwise derived from the context.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getInjectionData(context: Context, options?: {
|
|
30
|
-
scope?: Scope;
|
|
31
|
-
client?: Client;
|
|
32
|
-
}): {
|
|
33
|
-
dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined;
|
|
34
|
-
traceId: string | undefined;
|
|
35
|
-
spanId: string | undefined;
|
|
36
|
-
sampled: boolean | undefined;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Takes trace strings and propagates them as a remote active span.
|
|
40
|
-
* This should be used in addition to `continueTrace` in OTEL-powered environments.
|
|
41
|
-
*/
|
|
42
|
-
export declare function continueTraceAsRemoteSpan<T>(ctx: Context, options: Parameters<typeof continueTrace>[0], callback: () => T): T;
|
|
43
|
-
//# sourceMappingURL=propagator.d.ts.map
|