Trait zipkin::Sample
[−]
[src]
pub trait Sample { fn sample(&self, trace_id: TraceId) -> bool; }
A sampler decides whether or not a span should be recorded based on its trace ID.
A trace context received from a remote service may already indicate if the
span should be recorded, but if it does not, a Sample
r is responsible for
making that decision.
Required Methods
fn sample(&self, trace_id: TraceId) -> bool
Returns true
if the span associated with the trace ID should be
recorded.
Implementors
impl Sample for AlwaysSampler
impl Sample for NeverSampler
impl Sample for RandomSampler