A sampler that can be composed to make a final sampling decision.

interface ComposableSampler {
    getSamplingIntent(
        ...args: [
            context: Context,
            traceId: string,
            spanName: string,
            spanKind: SpanKind,
            attributes: Attributes,
            links: Link[],
        ],
    ): SamplingIntent;
    toString(): string;
}

Methods

  • Returns the information to make a sampling decision.

    Parameters

    • ...args: [
          context: Context,
          traceId: string,
          spanName: string,
          spanKind: SpanKind,
          attributes: Attributes,
          links: Link[],
      ]

    Returns SamplingIntent

  • Returns the sampler name or short description with the configuration.

    Returns string