1 | import { Context, SpanContext, TextMapGetter, TextMapPropagator, TextMapSetter } from '@opentelemetry/api';
|
2 | export declare const TRACE_PARENT_HEADER = "traceparent";
|
3 | export declare const TRACE_STATE_HEADER = "tracestate";
|
4 | /**
|
5 | * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}
|
6 | * @param traceParent - A meta property that comes from server.
|
7 | * It should be dynamically generated server side to have the server's request trace Id,
|
8 | * a parent span Id that was set on the server's request span,
|
9 | * and the trace flags to indicate the server's sampling decision
|
10 | * (01 = sampled, 00 = not sampled).
|
11 | * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'
|
12 | * For more information see {@link https://www.w3.org/TR/trace-context/}
|
13 | */
|
14 | export declare function parseTraceParent(traceParent: string): SpanContext | null;
|
15 | /**
|
16 | * Propagates {@link SpanContext} through Trace Context format propagation.
|
17 | *
|
18 | * Based on the Trace Context specification:
|
19 | * https://www.w3.org/TR/trace-context/
|
20 | */
|
21 | export declare class W3CTraceContextPropagator implements TextMapPropagator {
|
22 | inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
|
23 | extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
|
24 | fields(): string[];
|
25 | }
|
26 | //# sourceMappingURL=W3CTraceContextPropagator.d.ts.map |
\ | No newline at end of file |