SpandexDatadog.Adapter (spandex_datadog v1.4.0)

A Datadog APM implementation for Spandex.

Summary

Functions

Fetches the Datadog-specific conn request headers if they are present.

Injects Datadog-specific HTTP headers to represent the specified SpanContext

Functions

Link to this function

distributed_context(conn, opts)

@spec distributed_context(conn :: Plug.Conn.t(), Spandex.Tracer.opts()) ::
  {:ok, Spandex.SpanContext.t()} | {:error, :no_distributed_trace}
@spec distributed_context(headers :: Spandex.headers(), Spandex.Tracer.opts()) ::
  {:ok, Spandex.SpanContext.t()} | {:error, :no_distributed_trace}

Fetches the Datadog-specific conn request headers if they are present.

Link to this function

inject_context(headers, span_context, opts)

@spec inject_context(
  [{term(), term()}],
  Spandex.SpanContext.t(),
  Spandex.Tracer.opts()
) :: [{term(), term()}]

Injects Datadog-specific HTTP headers to represent the specified SpanContext