@sentry/opentelemetry 11.0.0-alpha.0 → 11.0.0-alpha.2
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 +91 -461
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +94 -462
- 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/constants.d.ts +0 -5
- package/build/types/constants.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -3
- package/build/types/index.d.ts.map +1 -1
- package/build/types/prepareSpanScope.d.ts +11 -0
- package/build/types/prepareSpanScope.d.ts.map +1 -0
- package/build/types/propagator.d.ts +0 -6
- package/build/types/propagator.d.ts.map +1 -1
- package/build/types/trace.d.ts +0 -33
- package/build/types/trace.d.ts.map +1 -1
- package/build/types/tracer.d.ts +6 -1
- package/build/types/tracer.d.ts.map +1 -1
- package/build/types/types.d.ts +1 -5
- package/build/types/types.d.ts.map +1 -1
- package/build/types/utils/buildContextWithSentryScopes.d.ts +1 -1
- package/build/types/utils/buildContextWithSentryScopes.d.ts.map +1 -1
- package/build/types/utils/contextData.d.ts.map +1 -1
- package/build/types/utils/getActiveSpan.d.ts +7 -2
- package/build/types/utils/getActiveSpan.d.ts.map +1 -1
- package/build/types/utils/getSamplingDecision.d.ts +0 -17
- package/build/types/utils/getSamplingDecision.d.ts.map +1 -1
- package/package.json +4 -3
- package/build/types/applyOtelSpanData.d.ts +0 -15
- package/build/types/applyOtelSpanData.d.ts.map +0 -1
- package/build/types/setupEventContextTrace.d.ts +0 -4
- package/build/types/setupEventContextTrace.d.ts.map +0 -1
- package/build/types/utils/backfillStreamedSpanData.d.ts +0 -14
- package/build/types/utils/backfillStreamedSpanData.d.ts.map +0 -1
- package/build/types/utils/mapStatus.d.ts +0 -3
- package/build/types/utils/mapStatus.d.ts.map +0 -1
- package/build/types/utils/parseSpanDescription.d.ts +0 -32
- package/build/types/utils/parseSpanDescription.d.ts.map +0 -1
- package/build/types/utils/reconcileDscSampled.d.ts +0 -14
- package/build/types/utils/reconcileDscSampled.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAuBlG,qBAAa,YAAa,YAAW,MAAM;IACzC,kBAAkB;IACX,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAoB1F;IAED,kBAAkB;IACX,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACpG,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,EACnE,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC,CAAC;IACV,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,EACnE,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC,CAAC;IAuDjB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,gBAAgB;IAkCxB,OAAO,CAAC,uBAAuB;CAgBhC"}
|
package/build/types/types.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Scope, StartSpanOptions } from '@sentry/core';
|
|
3
|
-
export interface OpenTelemetrySpanContext extends StartSpanOptions {
|
|
4
|
-
kind?: SpanKind;
|
|
5
|
-
}
|
|
1
|
+
import type { Scope } from '@sentry/core';
|
|
6
2
|
export interface CurrentScopes {
|
|
7
3
|
scope: Scope;
|
|
8
4
|
isolationScope: Scope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,KAAK,CAAC;CACvB"}
|
|
@@ -8,5 +8,5 @@ import type { Context } from '@opentelemetry/api';
|
|
|
8
8
|
* to restore the parent span when the incoming span is marked ignored for children.
|
|
9
9
|
* @returns A new context ready for `super.with` / `AsyncLocalStorage.run`.
|
|
10
10
|
*/
|
|
11
|
-
export declare function buildContextWithSentryScopes(context: Context
|
|
11
|
+
export declare function buildContextWithSentryScopes(context: Context): Context;
|
|
12
12
|
//# sourceMappingURL=buildContextWithSentryScopes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildContextWithSentryScopes.d.ts","sourceRoot":"","sources":["../../../src/utils/buildContextWithSentryScopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"buildContextWithSentryScopes.d.ts","sourceRoot":"","sources":["../../../src/utils/buildContextWithSentryScopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAUlD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAwBtE"}
|
|
@@ -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;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,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;;;;;;;;;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"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Span } from '@opentelemetry/api';
|
|
2
|
+
import type { Scope } from '@sentry/core';
|
|
2
3
|
/**
|
|
3
|
-
* Returns the currently active span.
|
|
4
|
+
* Returns the currently active span, or the active span of the given scope's context.
|
|
5
|
+
*
|
|
6
|
+
* Spans with an invalid span context (e.g. a malformed incoming trace/span id put on the context by
|
|
7
|
+
* a propagator) are ignored, matching the OTel SDK tracer, so consumers start a fresh trace instead
|
|
8
|
+
* of continuing a broken one.
|
|
4
9
|
*/
|
|
5
|
-
export declare function getActiveSpan(): Span | undefined;
|
|
10
|
+
export declare function getActiveSpan(scope?: Scope): Span | undefined;
|
|
6
11
|
//# sourceMappingURL=getActiveSpan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getActiveSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/getActiveSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"getActiveSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/getActiveSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,CAG7D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { SpanContext } from '@opentelemetry/api';
|
|
2
|
-
import type { Client, Span } from '@sentry/core';
|
|
3
2
|
/**
|
|
4
3
|
* OpenTelemetry only knows about SAMPLED or NONE decision,
|
|
5
4
|
* but for us it is important to differentiate between unset and unsampled.
|
|
@@ -8,20 +7,4 @@ import type { Client, Span } from '@sentry/core';
|
|
|
8
7
|
* but we additionally look at a special trace state to differentiate between them.
|
|
9
8
|
*/
|
|
10
9
|
export declare function getSamplingDecision(spanContext: SpanContext): boolean | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Resolve a span's sampling decision for trace propagation, also handling native Sentry spans.
|
|
13
|
-
*
|
|
14
|
-
* Prefer the OpenTelemetry trace state via {@link getSamplingDecision}. Native Sentry spans (created
|
|
15
|
-
* by the `SentryTracerProvider`) don't carry that trace state, so when it's absent we fall back to the
|
|
16
|
-
* span's own decision via `spanIsSampled` — but only for an *explicit* decision. An explicit decision
|
|
17
|
-
* originates at a real `SentrySpan` root (a negatively sampled root, or a child of one) or an ignored
|
|
18
|
-
* segment root. Other non-recording placeholder roots (orphan/suppressed spans or TwP placeholders)
|
|
19
|
-
* and remote spans have a *deferred* decision that lives elsewhere (the scope, or the incoming trace
|
|
20
|
-
* state), so we return `undefined` rather than wrongly asserting `-0`.
|
|
21
|
-
*
|
|
22
|
-
* TODO(v11): Once the OTel SDK provider is gone and every local span is a native Sentry span, the
|
|
23
|
-
* trace-state lookup only matters for remote (incoming) spans; the local path always reads the span's
|
|
24
|
-
* own decision, so the "native-vs-OTel-SDK span" framing can be dropped (local → span, remote → trace state).
|
|
25
|
-
*/
|
|
26
|
-
export declare function getSampledForPropagation(span: Span, client: Client | undefined): boolean | undefined;
|
|
27
10
|
//# sourceMappingURL=getSamplingDecision.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSamplingDecision.d.ts","sourceRoot":"","sources":["../../../src/utils/getSamplingDecision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"getSamplingDecision.d.ts","sourceRoot":"","sources":["../../../src/utils/getSamplingDecision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CA6BjF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/opentelemetry",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.2",
|
|
4
4
|
"description": "Official Sentry utilities for OpenTelemetry",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/opentelemetry",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sentry/conventions": "^0.
|
|
31
|
-
"@sentry/core": "11.0.0-alpha.
|
|
30
|
+
"@sentry/conventions": "^0.20.0",
|
|
31
|
+
"@sentry/core": "11.0.0-alpha.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@opentelemetry/api": "^1.9.0"
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"clean": "rimraf build coverage sentry-opentelemetry-*.tgz",
|
|
50
50
|
"lint:fix": "oxlint . --fix --type-aware",
|
|
51
51
|
"lint": "oxlint . --type-aware",
|
|
52
|
+
"lint:types": "oxlint src --type-aware --type-check",
|
|
52
53
|
"lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module",
|
|
53
54
|
"test": "yarn test:unit",
|
|
54
55
|
"test:unit": "vitest run",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Span } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Backfill a native Sentry span with the data the OpenTelemetry SDK pipeline would otherwise derive
|
|
4
|
-
* from OTel semantic attributes: `sentry.op`, `sentry.source`, the span name, `sentry.kind`, and status.
|
|
5
|
-
*
|
|
6
|
-
* On the OTel SDK provider this happens in the `SentrySpanProcessor`/`SentrySpanExporter` while
|
|
7
|
-
* converting `ReadableSpan`s to Sentry payloads (via `parseSpanDescription` + `mapStatus`).
|
|
8
|
-
* `SentryTracerProvider` creates native Sentry spans directly and never goes through that pipeline,
|
|
9
|
-
* so the same inference has to run here instead — once at span start, and again at span end
|
|
10
|
-
* (`finalizeStatus`, once attributes like `http.route` and the status code are available).
|
|
11
|
-
*/
|
|
12
|
-
export declare function applyOtelSpanData(span: Span, options?: {
|
|
13
|
-
finalizeStatus?: boolean;
|
|
14
|
-
}): void;
|
|
15
|
-
//# sourceMappingURL=applyOtelSpanData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyOtelSpanData.d.ts","sourceRoot":"","sources":["../../src/applyOtelSpanData.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAIzD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,IAAI,CAkC9F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupEventContextTrace.d.ts","sourceRoot":"","sources":["../../src/setupEventContextTrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAwB3D"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { StreamedSpanJSON } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Backfill op, source, name and data on a streamed span JSON from OTel semantic conventions.
|
|
4
|
-
* Mirrors the inference the {@link SentrySpanExporter} applies to non-streamed spans via `getSpanData`.
|
|
5
|
-
* Explicitly set attributes are preserved via `safeSetSpanJSONAttributes`.
|
|
6
|
-
*
|
|
7
|
-
* Runs as a `preprocessSpan` subscriber (streamed-only) on both span pipelines: the OTel SDK
|
|
8
|
-
* `SentrySpanProcessor` and the `SentryTracerProvider`. On the latter, `applyOtelSpanData` has already
|
|
9
|
-
* inferred most data on the native span; this fills the remaining gap (per-span `sentry.source` on
|
|
10
|
-
* child spans, which `applyOtelSpanData` only sets on segment roots). `inferSpanData` is deterministic
|
|
11
|
-
* on the same attributes, so re-running it here is a no-op for already-inferred fields.
|
|
12
|
-
*/
|
|
13
|
-
export declare function backfillStreamedSpanDataFromOtel(spanJSON: StreamedSpanJSON): void;
|
|
14
|
-
//# sourceMappingURL=backfillStreamedSpanData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backfillStreamedSpanData.d.ts","sourceRoot":"","sources":["../../../src/utils/backfillStreamedSpanData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrE;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAcjF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/mapStatus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAuB/D,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAwB5F"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Attributes } from '@opentelemetry/api';
|
|
2
|
-
import type { Span, SpanAttributes } from '@sentry/core';
|
|
3
|
-
interface SpanDescription {
|
|
4
|
-
op: string | undefined;
|
|
5
|
-
data?: Record<string, string | undefined>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Infer the op & description for a set of name, attributes and kind of a span.
|
|
9
|
-
*/
|
|
10
|
-
export declare function inferSpanData(attributes: SpanAttributes): SpanDescription;
|
|
11
|
-
/**
|
|
12
|
-
* Extract better op/description from an otel span.
|
|
13
|
-
*
|
|
14
|
-
* Does not overwrite the span name if the source is already set to custom to ensure
|
|
15
|
-
* that user-updated span names are preserved. In this case, we only adjust the op but
|
|
16
|
-
* leave span description and source unchanged.
|
|
17
|
-
*
|
|
18
|
-
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306
|
|
19
|
-
*/
|
|
20
|
-
export declare function parseSpanDescription(span: Span): SpanDescription;
|
|
21
|
-
/** Only exported for tests. */
|
|
22
|
-
export declare function descriptionForHttpMethod(attributes: Attributes): SpanDescription;
|
|
23
|
-
/** Exported for tests only */
|
|
24
|
-
export declare function getSanitizedUrl(attributes: Attributes): {
|
|
25
|
-
url: string | undefined;
|
|
26
|
-
urlPath: string | undefined;
|
|
27
|
-
query: string | undefined;
|
|
28
|
-
fragment: string | undefined;
|
|
29
|
-
hasRoute: boolean;
|
|
30
|
-
};
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=parseSpanDescription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseSpanDescription.d.ts","sourceRoot":"","sources":["../../../src/utils/parseSpanDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2BrD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAezD,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,eAAe,CA+CzE;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAKhE;AAmBD,+BAA+B;AAC/B,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,eAAe,CAkChF;AAED,8BAA8B;AAC9B,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG;IACvD,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAkCA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { DynamicSamplingContext } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Reconcile a freshly-derived DSC's `sampled` flag with the OTel sampling decision.
|
|
4
|
-
*
|
|
5
|
-
* Only applies to a DSC that core generated from the span's (binary) trace flags — never to a frozen
|
|
6
|
-
* incoming DSC from the trace state, which the caller leaves untouched per the propagation spec.
|
|
7
|
-
* Trace flags cannot tell a *deferred* decision (an incoming remote span whose decision lives in the
|
|
8
|
-
* trace state) apart from a definitive *unsampled* one — both read as `traceFlags: NONE`.
|
|
9
|
-
* `getSamplingDecision` resolves this via the OTel trace state, so we let it win here: drop `sampled`
|
|
10
|
-
* when the decision is deferred (`undefined`), and — matching the OTel SDK, whose unsampled spans are
|
|
11
|
-
* nameless non-recording spans — drop the transaction name when the trace is definitively unsampled.
|
|
12
|
-
*/
|
|
13
|
-
export declare function reconcileDscSampled(dsc: Partial<DynamicSamplingContext>, sampled: boolean | undefined): Partial<DynamicSamplingContext>;
|
|
14
|
-
//# sourceMappingURL=reconcileDscSampled.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reconcileDscSampled.d.ts","sourceRoot":"","sources":["../../../src/utils/reconcileDscSampled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,OAAO,CAAC,sBAAsB,CAAC,EACpC,OAAO,EAAE,OAAO,GAAG,SAAS,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CAajC"}
|