Crate zipkin

Source
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.
CurrentGuard
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.
OpenSpan
An open span.
SamplingFlags
Flags used to control sampling.
SetTracerError
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.
TraceContext
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.