@grow-codes/datadog-apm - v0.1.1
    Preparing search index...

    Class DatadogPropagator

    Datadog propagator: injects and extracts x-datadog-trace-id (low 64 bits, decimal), x-datadog-parent-id (decimal), x-datadog-sampling-priority (1/0) and, for 128-bit ids, x-datadog-tags: _dd.p.tid=<high 64 bits hex>.

    Conflict rules on extract (ddtrace's behaviour with style order datadog,tracecontext): when the carrier also holds a valid traceparent,

    • same trace id → the W3C parent id wins (the context from traceparent is kept),
    • different trace id → the Datadog context wins and the W3C context is remembered in the returned context; DatadogSpanLinkProcessor (installed by initTracing) adds it to the next span as a link with reason: terminated_context (see terminatedContextLinks).

    The rules apply whatever position datadog has in the propagator list.

    Implements

    • TextMapPropagator
    Index
    • Reads the Datadog headers (with the conflict rules above) into context.

      Parameters

      • context: Context
      • carrier: unknown
      • getter: TextMapGetter

      Returns Context

    • Header names this propagator reads and writes.

      Returns string[]

    • Writes the Datadog headers of the span in context; no-op without a valid span context.

      Parameters

      • context: Context
      • carrier: unknown
      • setter: TextMapSetter

      Returns void