WIP refactor metrics
This commit is contained in:
@@ -121,7 +121,7 @@ impl From<&InsertQueuesTx> for InsertQueuesTxMetrics {
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct MetricsPrometheusShort {
|
||||
counters: Vec<(String, u64)>,
|
||||
counters: Vec<String>,
|
||||
}
|
||||
|
||||
impl MetricsPrometheusShort {
|
||||
@@ -129,7 +129,7 @@ impl MetricsPrometheusShort {
|
||||
use std::fmt::Write;
|
||||
let mut s = String::new();
|
||||
for e in self.counters.iter() {
|
||||
write!(&mut s, "{} {}\n", e.0, e.1).unwrap();
|
||||
write!(&mut s, "{}\n", e).unwrap();
|
||||
}
|
||||
s
|
||||
}
|
||||
@@ -138,7 +138,7 @@ impl MetricsPrometheusShort {
|
||||
impl From<&stats::mett::DaemonMetrics> for MetricsPrometheusShort {
|
||||
fn from(value: &stats::mett::DaemonMetrics) -> Self {
|
||||
Self {
|
||||
counters: value.to_flatten_prometheus(),
|
||||
counters: value.to_flatten_prometheus("daemon"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user