We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8c7a4 commit 923c214Copy full SHA for 923c214
bin/router/src/pipeline/usage_reporting.rs
@@ -49,9 +49,8 @@ pub fn collect_usage_report(
49
usage_config: &UsageReportingConfig,
50
execution_result: &PlanExecutionOutput,
51
) {
52
- let mut rng = rand::rng();
53
- let sampled = rng.random::<f64>() < usage_config.sample_rate.as_f64();
54
- if !sampled {
+ let sample_rate = usage_config.sample_rate.as_f64();
+ if sample_rate < 1.0 && !rand::rng().random_bool(sample_rate) {
55
return;
56
}
57
if client_request_details
0 commit comments