Package version:

ApplicationInsightsSampler is responsible for the following: Implements same trace id hashing algorithm so that traces are sampled the same across multiple nodes Adds item count to span attribute if span is sampled (needed for ingestion service)

Param

0 to 1 value.

Hierarchy

  • ApplicationInsightsSampler

Implements

  • unknown

Constructors

Methods

Constructors

Methods

  • Checks whether span needs to be created and tracked.

    Returns

    a SamplingResult.

    Parameters

    • context: Context

      Parent Context which may contain a span.

    • traceId: string

      of the span to be created. It can be different from the traceId in the SpanContext. Typically in situations when the span to be created starts a new trace.

    • spanName: string

      of the span to be created.

    • spanKind: SpanKind

      of the span to be created.

    • attributes: Attributes

      Initial set of SpanAttributes for the Span being constructed.

    • links: Object

      Collection of links that will be associated with the Span to be created. Typically useful for batch operations.

    Returns SamplingResult

  • Return Sampler description

    Returns string

Generated using TypeDoc