No-op TextMap propagator used when no propagator is
explicitly configured (spec context/api-propagators.md
L322-L325, Status: Stable).
Spec L322-L325 MUST:
"The OpenTelemetry API MUST use no-op propagators unless explicitly configured otherwise."
Registered as the default propagator by
Otel.API.Propagator.TextMap.get_propagator/0 — when no
propagator is installed via set_propagator/1, this module
is returned so that inject/3 and extract/3 always have
a working propagator to dispatch to. This matches the shape
used by Otel.API.Trace.Tracer.Noop,
Otel.API.Metrics.Meter.Noop, and
Otel.API.Logs.Logger.Noop.
Invariants (spec L322-L325)
inject/3returns the carrier unchanged — no header is written.extract/3returns the context unchanged — no value is stored.fields/0returns[]— no headers are read or written.- No state held, no configuration, no logs emitted.
Public API
| Function | Role |
|---|---|
inject/3 | SDK (Noop implementation) — TextMap Inject (no-op) |
extract/3 | SDK (Noop implementation) — TextMap Extract (no-op) |
fields/0 | SDK (Noop implementation) — Fields (empty list) |
References
- OTel Context §Global Propagators:
opentelemetry-specification/specification/context/api-propagators.mdL308-L346 - OTel Context §TextMap Propagator:
opentelemetry-specification/specification/context/api-propagators.mdL114-L203
Summary
Functions
SDK (Noop implementation) — No-op Extract
(api-propagators.md L322-L325).
SDK (Noop implementation) — Fields
(api-propagators.md L322-L325).
SDK (Noop implementation) — No-op Inject
(api-propagators.md L322-L325).
Functions
@spec extract( ctx :: Otel.API.Ctx.t(), carrier :: Otel.API.Propagator.TextMap.carrier(), getter :: Otel.API.Propagator.TextMap.getter() ) :: Otel.API.Ctx.t()
SDK (Noop implementation) — No-op Extract
(api-propagators.md L322-L325).
Returns the context unchanged. The carrier and getter
parameters are accepted for behaviour conformance but
unused. Naturally satisfies spec L100-L102
"MUST NOT throw on parse failure" and
"MUST NOT store a new value".
@spec fields() :: [String.t()]
SDK (Noop implementation) — Fields
(api-propagators.md L322-L325).
Returns [] — the no-op propagator reads and writes no
headers.
@spec inject( ctx :: Otel.API.Ctx.t(), carrier :: Otel.API.Propagator.TextMap.carrier(), setter :: Otel.API.Propagator.TextMap.setter() ) :: Otel.API.Propagator.TextMap.carrier()
SDK (Noop implementation) — No-op Inject
(api-propagators.md L322-L325).
Returns the carrier unchanged. The ctx and setter
parameters are accepted for behaviour conformance but
unused.