diff --git a/core/src/repair_service.rs b/core/src/repair_service.rs index 3ef322e7d..b115e5136 100644 --- a/core/src/repair_service.rs +++ b/core/src/repair_service.rs @@ -177,7 +177,6 @@ impl RepairService { ("repair_request", format!("{:?}", repair_request), String), ("to", to.to_string(), String), ("from", local_addr.to_string(), String), - ("id", id.to_string(), String) ); } repair_socket.send_to(&req, to).unwrap_or_else(|e| { diff --git a/metrics/src/datapoint.rs b/metrics/src/datapoint.rs index f03d51b52..b7933484f 100644 --- a/metrics/src/datapoint.rs +++ b/metrics/src/datapoint.rs @@ -1,3 +1,5 @@ +use std::fmt; + #[derive(Clone, Debug)] pub struct DataPoint { pub name: &'static str, @@ -36,6 +38,15 @@ impl DataPoint { } } +impl fmt::Display for DataPoint { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "datapoint: {}", self.name)?; + for field in &self.fields { + write!(f, " {}={}", field.0, field.1)?; + } + Ok(()) + } +} #[macro_export] macro_rules! datapoint { (@field $point:ident $name:expr, $string:expr, String) => { diff --git a/metrics/src/metrics.rs b/metrics/src/metrics.rs index 114f10010..e01c2e4a9 100644 --- a/metrics/src/metrics.rs +++ b/metrics/src/metrics.rs @@ -206,7 +206,7 @@ impl MetricsAgent { barrier.wait(); } MetricsCommand::Submit(point, level) => { - log!(level, "{:?}", point); + log!(level, "{}", point); let (_, _, points) = points_map.entry(level).or_insert(( last_write_time, HashMap::new(),