#[non_exhaustive]pub struct SamplingConfig {
pub default_rate: f64,
pub per_event: BTreeMap<String, f64>,
pub always_log_at_or_above: Severity,
pub tail_buffer_capacity: u16,
pub honour_traceparent_sampled: bool,
}Expand description
Sampling config (spec 15 § 2 + spec 13 § 6).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.default_rate: f64Default head-sample rate [0.0, 1.0]. 1.0 = keep everything.
per_event: BTreeMap<String, f64>Per-event-name overrides. Key is full_name.
always_log_at_or_above: SeveritySeverity floor that bypasses sampling.
tail_buffer_capacity: u16Tail-on-error buffer capacity per obs::scope! frame.
honour_traceparent_sampled: boolHonour W3C traceparent.sampled from inbound HTTP. Default true.
Trait Implementations§
Source§impl Clone for SamplingConfig
impl Clone for SamplingConfig
Source§fn clone(&self) -> SamplingConfig
fn clone(&self) -> SamplingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SamplingConfig
impl Debug for SamplingConfig
Source§impl Default for SamplingConfig
impl Default for SamplingConfig
Source§fn default() -> SamplingConfig
fn default() -> SamplingConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SamplingConfig
impl<'de> Deserialize<'de> for SamplingConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SamplingConfig
impl Serialize for SamplingConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SamplingConfig
impl RefUnwindSafe for SamplingConfig
impl Send for SamplingConfig
impl Sync for SamplingConfig
impl Unpin for SamplingConfig
impl UnsafeUnpin for SamplingConfig
impl UnwindSafe for SamplingConfig
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