Propagator that extracts B3 context in both single and multi-header variants, with configurable injection format defaulting to B3 single-header. Due to the asymmetry in injection and extraction formats this is not suitable to be implemented as a composite propagator. Based on: https://github.com/openzipkin/b3-propagation

Implements

Constructors

Properties

Methods

Constructors

Properties

_fields: string[]

Methods

  • Given a Context and a carrier, extract context values from a carrier and return a new context, created from the old context, with the extracted values.

    Parameters

    • context: Context

      the Context from which to extract values to transmit over the wire.

    • carrier: unknown

      the carrier of propagation fields, such as http request headers.

    • getter: TextMapGetter

      an optional TextMapGetter. If undefined, keys will be all own properties, and keys will be accessed by direct object access.

    Returns Context

  • Injects values from a given Context into a carrier.

    OpenTelemetry defines a common set of format values (TextMapPropagator), and each has an expected carrier type.

    Parameters

    • context: Context

      the Context from which to extract values to transmit over the wire.

    • carrier: unknown

      the carrier of propagation fields, such as http request headers.

    • setter: TextMapSetter

      an optional TextMapSetter. If undefined, values will be set by direct object assignment.

    Returns void