Module propagation

Module propagation 

Source
Expand description

Trace context propagation helpers for grafos-rpc and grafos-mq.

This module provides functions to inject and extract trace context from binary headers (for RPC shared-memory transport) and from message headers (for MQ message passing).

The RPC propagation extends the shared-memory request region header with a 32-byte trace context field. MQ propagation uses the "traceparent" header key in the message’s headers field.

Constants§

TRACEPARENT_HEADER
The W3C header name used for MQ trace propagation.

Functions§

decode_binary
Decode a trace context from a 32-byte buffer read from an RPC header.
encode_binary
Encode a trace context into a 32-byte buffer suitable for embedding in an RPC shared-memory header.
extract_traceparent
Extract a trace context from a header list.
extract_traceparent_strict
Extract a trace context from a header list, returning the parse error if the header is present but malformed.
generate_trace_id
Generate a fresh W3C traceparent string suitable for correlation.
inject_traceparent
Inject a trace context as a W3C traceparent string into a header list.