pub fn track_new_sampled<T>(name: &str, value: T, sample_rate: f64) -> TExpand description
Track variable creation with sampling. Only records the event if the sample check passes. Returns the value unchanged regardless of sampling.
§Arguments
name- Variable namevalue- The value being trackedsample_rate- Probability of tracking (0.0 to 1.0)
§Examples
// Track only ~10% of calls
let x = track_new_sampled("x", 42, 0.1);