Expand description
Zipkin is a library for collecting timing information about computations in distributed systems. This information is collected into Zipkin spans.
This library corresponds to version 2 of the Zipkin specification.
§Serialization
If the serde
Cargo feature is enabled, Annotation
, Endpoint
, Kind
, Span
, SpanId
, and
TraceId
implement Serialize
and Deserialize
in the standard Zipkin format.
Modules§
- annotation
- Annotations.
- endpoint
- Endpoints.
- report
- Span reporters.
- sample
- Span samplers.
- sampling_
flags - Sampling flags.
- span
- Spans.
- span_id
- Span IDs.
- trace_
context - Trace contexts.
- trace_
id - Trace IDs.
Structs§
- Annotation
- Associates an event that explains latency with a timestamp.
- Attached
- A type indicating that an
OpenSpan
is “attached” to the current thread. - Bind
- A type which wraps a future, associating it with an
OpenSpan
. - Current
Guard - A guard object for the thread-local current trace context.
- Detached
- A type indicating that an
OpenSpan
is “detached” from the current thread. - Endpoint
- The network context of a node in the service graph.
- Open
Span - An open span.
- Sampling
Flags - Flags used to control sampling.
- SetTracer
Error - The error returned when attempting to set a tracer when one is already installed.
- Span
- A
Span
represents a single operation over some range of time. - SpanId
- The ID of a span.
- Trace
Context - A
TraceContext
represents a distributed trace request. - TraceId
- The ID of a trace.
Enums§
- Kind
- The “kind” of a span.
Traits§
- Report
- A reporter consumes Zipkin spans and reports them.
- Sample
- A sampler decides whether or not a span should be recorded based on its trace ID.
Functions§
- current
- Returns this thread’s current trace context.
- join_
trace - Joins an existing trace.
- new_
child - Stats a new span with the specified parent.
- new_
trace - Starts a new trace.
- new_
trace_ from - Stats a new trace with specific sampling flags.
- next_
span - Creates a new span parented to the current one if it exists, or starting a new trace otherwise.
- set_
current - Sets this thread’s current trace context.
- set_
tracer - Initializes the global tracer.
Attribute Macros§
- spanned
- Wraps the execution of a function or method in a span.