Struct relay_sampling::config::SamplingRule
source · pub struct SamplingRule {
pub condition: RuleCondition,
pub sampling_value: SamplingValue,
pub ty: RuleType,
pub id: RuleId,
pub time_range: TimeRange,
pub decaying_fn: DecayingFunction,
}
Expand description
A sampling rule as it is deserialized from the project configuration.
Fields§
§condition: RuleCondition
A condition to match for this sampling rule.
Sampling rules do not run if their condition does not match.
sampling_value: SamplingValue
The sample rate to apply when this rule matches.
ty: RuleType
The rule type declares what to apply a dynamic sampling rule to and how.
id: RuleId
The unique identifier of this rule.
time_range: TimeRange
The time range the rule should be applicable in.
The time range is open on both ends by default. If a time range is closed on at least one end, the rule is considered a decaying rule.
decaying_fn: DecayingFunction
Declares how to interpolate the sample rate for rules with bounded time range.
Implementations§
source§impl SamplingRule
impl SamplingRule
Trait Implementations§
source§impl Clone for SamplingRule
impl Clone for SamplingRule
source§fn clone(&self) -> SamplingRule
fn clone(&self) -> SamplingRule
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 SamplingRule
impl Debug for SamplingRule
source§impl<'de> Deserialize<'de> for SamplingRule
impl<'de> Deserialize<'de> for SamplingRule
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
Auto Trait Implementations§
impl Freeze for SamplingRule
impl RefUnwindSafe for SamplingRule
impl Send for SamplingRule
impl Sync for SamplingRule
impl Unpin for SamplingRule
impl UnwindSafe for SamplingRule
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
)