[][src]Trait zipkin::sample::Sample

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 Sampler 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.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized> Sample for Arc<T> where
    T: Sample
[src]

impl<T: ?Sized> Sample for Box<T> where
    T: Sample
[src]

Loading content...

Implementors

impl Sample for AlwaysSampler[src]

impl Sample for NeverSampler[src]

impl Sample for RandomSampler[src]

Loading content...