Skip to content

Commit

Permalink
fix: Re-add QueuingMetricSink to cadence setup (#5300)
Browse files Browse the repository at this point in the history
* fix: Re-add QueuingMetricSink to cadence setup

We are currently seeing only a handful of metrics being emitted and it
might be due to that.

* fix import
  • Loading branch information
untitaker authored Jan 4, 2024
1 parent a9e01de commit d449a68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rust_snuba/src/metrics/statsd.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cadence::prelude::*;
use cadence::{MetricBuilder, MetricError, StatsdClient};
use cadence::{MetricBuilder, MetricError, QueuingMetricSink, StatsdClient};
use rust_arroyo::utils::metrics::Metrics as ArroyoMetrics;
use statsdproxy::cadence::StatsdProxyMetricSink;
use statsdproxy::config::AggregateMetricsConfig;
Expand Down Expand Up @@ -27,7 +27,9 @@ impl StatsDBackend {
AggregateMetrics::new(config, upstream)
});

let mut client_builder = StatsdClient::builder(prefix, aggregator_sink);
let queuing_sink = QueuingMetricSink::from(aggregator_sink);

let mut client_builder = StatsdClient::builder(prefix, queuing_sink);
for (k, v) in global_tags {
client_builder = client_builder.with_tag(k, v);
}
Expand Down

0 comments on commit d449a68

Please sign in to comment.