UNPKG

1.14 kBTypeScriptView Raw
1import { SpanAttributes } from './attributes';
2import { SpanContext } from './span_context';
3/**
4 * A pointer from the current {@link Span} to another span in the same trace or
5 * in a different trace.
6 * Few examples of Link usage.
7 * 1. Batch Processing: A batch of elements may contain elements associated
8 * with one or more traces/spans. Since there can only be one parent
9 * SpanContext, Link is used to keep reference to SpanContext of all
10 * elements in the batch.
11 * 2. Public Endpoint: A SpanContext in incoming client request on a public
12 * endpoint is untrusted from service provider perspective. In such case it
13 * is advisable to start a new trace with appropriate sampling decision.
14 * However, it is desirable to associate incoming SpanContext to new trace
15 * initiated on service provider side so two traces (from Client and from
16 * Service Provider) can be correlated.
17 */
18export interface Link {
19 /** The {@link SpanContext} of a linked span. */
20 context: SpanContext;
21 /** A set of {@link SpanAttributes} on the link. */
22 attributes?: SpanAttributes;
23}
24//# sourceMappingURL=link.d.ts.map
\No newline at end of file