pub struct TraceState {
pub route: String,
pub trace_id: String,
pub trace_path: String,
pub span_id: String,
pub parent_span_id: Option<String>,
pub cid: Option<String>,
pub start_time: String,
pub annotations: HashMap<String, Value>,
pub custom_log_keys: HashMap<String, Value>,
pub zero_traced: bool,
}Expand description
Per-execution trace state (Java TraceInfo + LogContext, combined —
one task-local anchor holds both the trace identity and the log context).
Fields§
§route: String§trace_id: String§trace_path: String§span_id: StringThis execution’s own span (16-hex, minted at creation — Java parity).
parent_span_id: Option<String>The caller’s span, taken from the incoming envelope’s span_id.
cid: Option<String>The business correlation id captured from the incoming event — a separate concern from the trace id.
start_time: StringISO-8601 UTC start time (Java TraceInfo.startTime).
annotations: HashMap<String, Value>Business annotations for the distributed-trace dataset
(PostOffice::annotate_trace) — flows to the telemetry sink.
custom_log_keys: HashMap<String, Value>Developer-supplied log-context key-values
(PostOffice::update_context) — flows to the application log only.
zero_traced: boolTrue on a zero-traced route: the trace CONTEXT still flows (replies and
nested calls keep the trace id/path — Java propagates them from the
incoming event unconditionally), but this hop emits no telemetry and
mints no span into the chain (Java never calls startTracing, so
touch() finds no TraceInfo and stamps no span id).
Implementations§
Trait Implementations§
Source§impl Clone for TraceState
impl Clone for TraceState
Source§fn clone(&self) -> TraceState
fn clone(&self) -> TraceState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more