diff --git a/data-pipeline/src/trace_exporter.rs b/data-pipeline/src/trace_exporter.rs index d3789a63d..779c65953 100644 --- a/data-pipeline/src/trace_exporter.rs +++ b/data-pipeline/src/trace_exporter.rs @@ -200,7 +200,7 @@ impl TraceExporter { self.emit_metric( HealthMetric::Count(STAT_SEND_TRACES_ERRORS, 1), Some(vec![ - Tag::new("response_code", response_status.as_str()).unwrap() + &Tag::new("response_code", response_status.as_str()).unwrap() ]), ); anyhow::bail!("Agent did not accept traces: {response_body}"); @@ -235,18 +235,13 @@ impl TraceExporter { } /// Emit a health metric to dogstatsd - fn emit_metric(&self, metric: HealthMetric, custom_tags: Option>) { + fn emit_metric(&self, metric: HealthMetric, custom_tags: Option>) { if let Some(flusher) = &self.dogstatsd { if custom_tags.is_some() { match metric { HealthMetric::Count(name, c) => { - let tags = self - .common_stats_tags - .clone() // TODO: how the heck do we get around needing a clone here... :( - .into_iter() - .chain(custom_tags.unwrap()) - .collect::>(); - flusher.send(vec![DogStatsDAction::Count(name, c, &tags)]) + let tags = self.common_stats_tags.iter().chain(custom_tags.unwrap()); + flusher.send(vec![DogStatsDAction::Count(name, c, tags)]) } } } else { diff --git a/dogstatsd-client/src/lib.rs b/dogstatsd-client/src/lib.rs index 272d753e4..9728713a2 100644 --- a/dogstatsd-client/src/lib.rs +++ b/dogstatsd-client/src/lib.rs @@ -1,6 +1,5 @@ // Copyright 2024-Present Datadog, Inc. https://www.datadoghq.com/ // SPDX-License-Identifier: Apache-2.0 -#![feature(variant_count)] use ddcommon::tag::Tag; use ddcommon::Endpoint;