Skip to main content

should_sample

Function should_sample 

Source
pub fn should_sample() -> bool
Expand description

Returns true if the current non-error event should be sampled (logged). Always returns true when the rate is 1.0. Uses a simple counter-based approach that is deterministic and does not require the rand crate at this call site.