Module tarpc::trace

source · []
Expand description

Provides building blocks for tracing distributed programs.

A trace is logically a tree of causally-related events called spans. Traces are tracked via a context that identifies the current trace, span, and parent of the current span. In distributed systems, a context can be sent from client to server to connect events occurring on either side.

This crate’s design is based on opencensus tracing.

Structs

A context for tracing the execution of processes, distributed or otherwise.

Returned when a Context cannot be constructed from a Span.

A 64-bit identifier of a span within a trace. The identifier is unique within the span’s trace.

A 128-bit UUID identifying a trace. All spans caused by the same originating span share the same trace ID.

Enums

Indicates whether a sampler has decided whether or not to sample the trace associated with the Context. Downstream samplers do not need to abide by “no sample” decisions–for example, an upstream client may choose to never sample, which may not make sense for the client’s dependencies. On the other hand, if an upstream process has chosen to sample this trace, then the downstream samplers are expected to respect that decision and also sample the trace. Otherwise, the full trace would not be able to be reconstructed reliably.