UNPKG

1.99 kBTypeScriptView Raw
1import type { DynamicSamplingContext } from './envelope';
2export type TracePropagationTargets = (string | RegExp)[];
3/**
4 * `PropagationContext` represents the data from an incoming trace. It should be constructed from incoming trace data,
5 * usually represented by `sentry-trace` and `baggage` HTTP headers.
6 *
7 * There is always a propagation context present in the SDK (or rather on Scopes), holding at least a `traceId`. This is
8 * to ensure that there is always a trace we can attach events onto, even if performance monitoring is disabled. If
9 * there was no incoming `traceId`, the `traceId` will be generated by the current SDK.
10 */
11export interface PropagationContext {
12 /**
13 * Either represents the incoming `traceId` or the `traceId` generated by the current SDK, if there was no incoming trace.
14 */
15 traceId: string;
16 /**
17 * Represents the execution context of the current SDK. This acts as a fallback value to associate events with a
18 * particular execution context when performance monitoring is disabled.
19 *
20 * The ID of a current span (if one exists) should have precedence over this value when propagating trace data.
21 */
22 spanId: string;
23 /**
24 * Represents the sampling decision of the incoming trace.
25 *
26 * The current SDK should not modify this value!
27 */
28 sampled?: boolean;
29 /**
30 * The `parentSpanId` denotes the ID of the incoming client span. If there is no `parentSpanId` on the propagation
31 * context, it means that the the incoming trace didn't come from a span.
32 *
33 * The current SDK should not modify this value!
34 */
35 parentSpanId?: string;
36 /**
37 * An undefined dsc in the propagation context means that the current SDK invocation is the head of trace and still free to modify and set the DSC for outgoing requests.
38 *
39 * The current SDK should not modify this value!
40 */
41 dsc?: Partial<DynamicSamplingContext>;
42}
43//# sourceMappingURL=tracing.d.ts.map
\No newline at end of file