diff --git a/src/server/metrics.rs b/src/server/metrics.rs index dcdec7d71c..c9de85f0e3 100644 --- a/src/server/metrics.rs +++ b/src/server/metrics.rs @@ -126,27 +126,7 @@ impl Metrics { } pub fn incr_with_tags(&self, label: &str, tags: Option) { - if let Some(client) = self.client.as_ref() { - let mut tagged = client.incr_with_tags(label); - let mut mtags = self.tags.clone().unwrap_or_default(); - if let Some(tags) = tags { - mtags.extend(tags.tags); - } - for key in mtags.tags.keys().clone() { - if let Some(val) = mtags.tags.get(key) { - tagged = tagged.with_tag(&key, val.as_ref()); - } - } - // Include any "hard coded" tags. - // incr = incr.with_tag("version", env!("CARGO_PKG_VERSION")); - match tagged.try_send() { - Err(e) => { - // eat the metric, but log the error - warn!("⚠️ Metric {} error: {:?} ", label, e; mtags); - } - Ok(v) => trace!("☑️ {:?}", v.as_metric_str()), - } - } + self.count_with_tags(label, 1, tags) } pub fn count(&self, label: &str, count: i64) {