pub struct ProbabilisticSampler { /* private fields */ }Expand description
This samples a certain percentage of traces.
Implementations§
Trait Implementations§
Source§impl Clone for ProbabilisticSampler
impl Clone for ProbabilisticSampler
Source§fn clone(&self) -> ProbabilisticSampler
fn clone(&self) -> ProbabilisticSampler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProbabilisticSampler
impl Debug for ProbabilisticSampler
Source§impl<T> Sampler<T> for ProbabilisticSampler
impl<T> Sampler<T> for ProbabilisticSampler
Source§fn is_sampled(&self, _span: &CandidateSpan<'_, T>) -> bool
fn is_sampled(&self, _span: &CandidateSpan<'_, T>) -> bool
This method decides whether a trace with given
span should be sampled.Source§fn or<U>(self, other: U) -> OrSampler<Self, U>
fn or<U>(self, other: U) -> OrSampler<Self, U>
Returns the sampler that samples a trace if
self or other decides to sample it.Source§fn and<U>(self, other: U) -> AndSampler<Self, U>
fn and<U>(self, other: U) -> AndSampler<Self, U>
Returns the sampler that samples a trace if both of
self and other decides to sample it.Auto Trait Implementations§
impl Freeze for ProbabilisticSampler
impl RefUnwindSafe for ProbabilisticSampler
impl Send for ProbabilisticSampler
impl Sync for ProbabilisticSampler
impl Unpin for ProbabilisticSampler
impl UnwindSafe for ProbabilisticSampler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more