[][src]Enum opentelemetry::sdk::trace::Sampler

pub enum Sampler {
    AlwaysOn,
    AlwaysOff,
    ParentBased(Box<Sampler>),
    TraceIdRatioBased(f64),
}

Sampling options

Variants

AlwaysOn

Always sample the trace

AlwaysOff

Never sample the trace

ParentBased(Box<Sampler>)

Respects the parent span's sampling decision or delegates a delegate sampler for root spans.

TraceIdRatioBased(f64)

Sample a given fraction of traces. Fractions >= 1 will always sample. If the parent span is sampled, then it's child spans will automatically be sampled. Fractions < 0 are treated as zero, but spans may still be sampled if their parent is.

Trait Implementations

impl Clone for Sampler[src]

impl Debug for Sampler[src]

impl ShouldSample for Sampler[src]

Auto Trait Implementations

impl RefUnwindSafe for Sampler

impl Send for Sampler

impl Sync for Sampler

impl Unpin for Sampler

impl UnwindSafe for Sampler

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,