link.d.ts 1.2 KB

1234567891011121314151617181920212223242526
  1. import { SpanAttributes } from './attributes';
  2. import { 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. */
  18. export 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. /** Count of attributes of the link that were dropped due to collection limits */
  24. droppedAttributesCount?: number;
  25. }
  26. //# sourceMappingURL=link.d.ts.map