pub trait HeadSampler {
const ENABLED: bool = true;
// Required method
fn should_sample<S>(&self, span: &SpanRef<'_, S>) -> bool
where S: for<'a> LookupSpan<'a>;
}Expand description
A trait that allows customizing which spans are sampled.
Provided Associated Constants§
Required Methods§
Sourcefn should_sample<S>(&self, span: &SpanRef<'_, S>) -> boolwhere
S: for<'a> LookupSpan<'a>,
fn should_sample<S>(&self, span: &SpanRef<'_, S>) -> boolwhere
S: for<'a> LookupSpan<'a>,
Determines whether the span and its children should be sampled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".