pub enum SamplingValue {
SampleRate {
value: f64,
},
Factor {
value: f64,
},
Reservoir {
limit: i64,
},
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.
Reservoir
A reservoir limit.
A rule with a reservoir limit will be sampled if the rule have been matched fewer times than the limit.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more