Skip to main content

ratio_draw

Function ratio_draw 

Source
fn ratio_draw(trace_id: &str) -> f64
Expand description

A pseudo-random draw in [0.0, 1.0) derived deterministically from a trace id, so the same trace id always samples the same way within a process. Not cryptographic; good enough for sample_ratio without a rand crate.