pub enum SamplingValue {
SampleRate {
value: f64,
},
Factor {
value: f64,
},
MinimumSampleRate {
value: f64,
},
}Expand description
A sampling strategy definition.
A sampling strategy refers to the strategy that we want to use for sampling a specific rule.
Variants§
SampleRate
A direct sample rate to apply.
A rule with a sample rate will be matched and the final sample rate will be computed by multiplying its sample rate with the accumulated factors from previous rules.
Factor
A factor to apply on a subsequently matching rule.
A rule with a factor will be matched and the matching will continue onto the next rules until a sample rate rule is found. The matched rule’s factor will be multiplied with the accumulated factors before moving onto the next possible match.
MinimumSampleRate
A minimum sample rate.
The sample rate specified in the rule will be used as a minimum over the otherwise used sample rate.
Only the first matching minimum sample rate will be applied.
Trait Implementations§
Source§impl Clone for SamplingValue
impl Clone for SamplingValue
Source§fn clone(&self) -> SamplingValue
fn clone(&self) -> SamplingValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SamplingValue
impl Debug for SamplingValue
Source§impl<'de> Deserialize<'de> for SamplingValue
impl<'de> Deserialize<'de> for SamplingValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SamplingValue
impl PartialEq for SamplingValue
Source§fn eq(&self, other: &SamplingValue) -> bool
fn eq(&self, other: &SamplingValue) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SamplingValue
impl Serialize for SamplingValue
impl Copy for SamplingValue
impl StructuralPartialEq for SamplingValue
Auto Trait Implementations§
impl Freeze for SamplingValue
impl RefUnwindSafe for SamplingValue
impl Send for SamplingValue
impl Sync for SamplingValue
impl Unpin for SamplingValue
impl UnsafeUnpin for SamplingValue
impl UnwindSafe for SamplingValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more