Enum relay_sampling::config::SamplingValue
source · pub enum SamplingValue {
SampleRate {
value: f64,
},
Factor {
value: f64,
},
Reservoir {
limit: i64,
},
}
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.
Reservoir
A reservoir limit.
A rule with a reservoir limit will be sampled if the rule have been matched fewer times than the limit.
Trait Implementations§
source§impl Clone for SamplingValue
impl Clone for SamplingValue
source§fn clone(&self) -> SamplingValue
fn clone(&self) -> SamplingValue
Returns a copy 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 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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SamplingValue
impl PartialEq for SamplingValue
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 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)