Available on crate feature
rpc only.Expand description
Span context propagation for remote RPC calls
This module provides the SpanContextCarrier type for propagating trace context
across remote boundaries. The type is always available when rpc feature is enabled,
but actual OpenTelemetry integration requires the tracing-opentelemetry feature.
The propagated context is scoped to a single request handler via a tokio task-local,
installed by the dispatch loop in handle_connection. This isolates concurrent
requests from each other and is robust to thread migration across .await points.
Structs§
- Span
Context Carrier - Carrier for propagating span context across RPC boundaries using W3C Trace Context format.
Functions§
- scope_
remote - Run
futwithcarrier’s context installed as the per-task scope read byset_span_parent_from_remote. - set_
span_ parent_ from_ remote - Set the parent of a span from the propagated remote context, if one is in scope.