instrument_propagation (instrument v0.6.1)
View SourceContext propagation helpers for cross-process communication.
This module provides helpers for propagating context across process boundaries and encoding/decoding W3C TraceContext format.
Summary
Functions
Makes a gen_server call with the current context propagated. The server must be aware of context propagation to use this.
Makes a gen_server call with the current context propagated and timeout.
Makes a gen_server cast with the current context propagated.
Extracts trace context from a carrier (map). Uses all registered propagators.
Extracts trace context from a carrier into an existing context. Uses all registered propagators.
Extracts context from HTTP headers.
Injects the current trace context into a carrier (map). Uses all registered propagators.
Injects trace context into a carrier (map). Uses all registered propagators.
Injects context into HTTP headers format.
Spawns a process with the current context propagated.
Spawns a process with args and the current context propagated.
Spawns a linked process with the current context propagated.
Spawns a linked process with args and the current context propagated.
Spawns a monitored process with the current context propagated.
Spawns a process with options and the current context propagated.
Functions
Makes a gen_server call with the current context propagated. The server must be aware of context propagation to use this.
Makes a gen_server call with the current context propagated and timeout.
Makes a gen_server cast with the current context propagated.
-spec extract(map()) -> instrument_context:context().
Extracts trace context from a carrier (map). Uses all registered propagators.
-spec extract(map(), instrument_context:context()) -> instrument_context:context().
Extracts trace context from a carrier into an existing context. Uses all registered propagators.
-spec extract_headers([{binary() | string(), binary() | string()}]) -> instrument_context:context().
Extracts context from HTTP headers.
Injects the current trace context into a carrier (map). Uses all registered propagators.
-spec inject(instrument_context:context(), map()) -> map().
Injects trace context into a carrier (map). Uses all registered propagators.
-spec inject_headers(instrument_context:context()) -> [{binary(), binary()}].
Injects context into HTTP headers format.
Spawns a process with the current context propagated.
Spawns a process with args and the current context propagated.
Spawns a linked process with the current context propagated.
Spawns a linked process with args and the current context propagated.
Spawns a monitored process with the current context propagated.
Spawns a process with options and the current context propagated.