1 | /**
|
2 | * SpanContext represents Span state that must propagate to descendant Spans
|
3 | * and across process boundaries.
|
4 | *
|
5 | * SpanContext is logically divided into two pieces: the user-level "Baggage"
|
6 | * (see setBaggageItem and getBaggageItem) that propagates across Span
|
7 | * boundaries and any Tracer-implementation-specific fields that are needed to
|
8 | * identify or otherwise contextualize the associated Span instance (e.g., a
|
9 | * <trace_id, span_id, sampled> tuple).
|
10 | */
|
11 | export class SpanContext {
|
12 | // The SpanContext is entirely implementation dependent
|
13 |
|
14 | /**
|
15 | * Returns a string representation of the implementation internal trace ID.
|
16 | *
|
17 | * @returns {string}
|
18 | */
|
19 | toTraceId(): string {
|
20 | return '';
|
21 | }
|
22 |
|
23 | /**
|
24 | * Returns a string representation of the implementation internal span ID.
|
25 | *
|
26 | * @returns {string}
|
27 | */
|
28 | toSpanId(): string {
|
29 | return '';
|
30 | }
|
31 | }
|
32 |
|
33 | export default SpanContext;
|