udp: update metrics crate

This commit is contained in:
Joakim Frostegård 2024-01-20 09:42:17 +01:00
parent 1a6b4345d4
commit 0c03048ce8
4 changed files with 60 additions and 121 deletions

View file

@ -152,9 +152,9 @@ pub fn run_statistics_worker(
for (prefix, count) in prefixes {
::metrics::gauge!(
"aquatic_peer_id_prefixes",
count as f64,
"prefix_hex" => prefix.to_string(),
);
)
.set(count as f64);
}
}
@ -169,9 +169,9 @@ pub fn run_statistics_worker(
if config.statistics.run_prometheus_endpoint {
::metrics::gauge!(
"aquatic_peer_clients",
count as f64,
"client" => client.to_string(),
);
)
.set(count as f64);
}
}