Skip to content

Commit

Permalink
fix: use empty tags
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgallotta committed Sep 18, 2024
1 parent 8e35c80 commit 15f48b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dogstatsd/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::collections::HashMap;
use std::hash::{Hash, Hasher};
use ustr::Ustr;

pub(crate) const EMPTY_TAGS: SortedTags = SortedTags { values: Vec::new() };
pub const EMPTY_TAGS: SortedTags = SortedTags { values: Vec::new() };

#[derive(Clone, Debug)]
pub enum MetricValue {
Expand Down
3 changes: 2 additions & 1 deletion serverless/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use dogstatsd::{
};

use tokio_util::sync::CancellationToken;
use dogstatsd::metric::EMPTY_TAGS;

const DOGSTATSD_FLUSH_INTERVAL: u64 = 10;
const DEFAULT_DOGSTATSD_PORT: u16 = 8125;
Expand Down Expand Up @@ -116,7 +117,7 @@ async fn start_dogstatsd(
dd_https_proxy: Option<String>,
) -> (CancellationToken, Option<Flusher>) {
let metrics_aggr = Arc::new(Mutex::new(
MetricsAggregator::new(Vec::new(), CONTEXTS).expect("Failed to create metrics aggregator"),
MetricsAggregator::new(EMPTY_TAGS, CONTEXTS).expect("Failed to create metrics aggregator"),
));

let dogstatsd_config = DogStatsDConfig {
Expand Down

0 comments on commit 15f48b7

Please sign in to comment.