Trace data helpers for signal correlation.
Provides functions to create and attach trace data to signals using the Jido.Signal.Ext.Trace extension (namespace: "correlation").
Summary
Functions
Creates a child trace from a parent trace context.
Gets trace data from a signal.
Creates a new root trace with fresh trace_id and span_id.
Attaches trace data to a signal using the correlation extension.
Functions
Creates a child trace from a parent trace context.
The child trace:
- Inherits the same trace_id
- Gets a new span_id
- Has parent_span_id set to the parent's span_id
- Has causation_id set to the provided value (typically the parent signal's id)
@spec get(Jido.Signal.t()) :: map() | nil
Gets trace data from a signal.
@spec new_root() :: map()
Creates a new root trace with fresh trace_id and span_id.
@spec put(Jido.Signal.t(), map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Attaches trace data to a signal using the correlation extension.