adk_trace_context (erlang_adk v0.7.0)
View SourceStrict W3C Trace Context parsing and propagation.
Trace identifiers are correlation data, never authorization data. Callers decide whether an inbound parent is trusted before passing the extracted context to an invocation. This module only validates and serializes the wire representation; it never changes a sampling policy implicitly.
Summary
Functions
Extract exactly one traceparent and at most one tracestate header.
Format a local or extracted context as a version-00 traceparent.
Inject traceparent/tracestate into a map or proplist of headers.
Parse the W3C version-00 traceparent representation.
Validate and canonicalize W3C tracestate. OWS around members is removed; member order is preserved because the left-most entry is special.
Types
Functions
-spec extract(map() | list()) -> {ok, trace_context()} | {error, term()} | not_found.
Extract exactly one traceparent and at most one tracestate header.
Format a local or extracted context as a version-00 traceparent.
Inject traceparent/tracestate into a map or proplist of headers.
-spec parse(binary()) -> {ok, trace_context()} | {error, term()}.
Parse the W3C version-00 traceparent representation.
Validate and canonicalize W3C tracestate. OWS around members is removed; member order is preserved because the left-most entry is special.