aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/stats/prometheus.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 21:56:20 +0100
committertv <tv@krebsco.de>2026-10-26 21:56:20 +0100
commitf937094b9c585b0b1f1f404ee1f962d97dcc2e80 (patch)
tree3c4e5ba952c6babc5fee757995f838ba2deb909b /src/api/stats/prometheus.rs
parent7dc2b728ca868ec7ed5f7b72eef43b0a0087ae04 (diff)
make clippy happy again
Diffstat (limited to 'src/api/stats/prometheus.rs')
-rw-r--r--src/api/stats/prometheus.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/stats/prometheus.rs b/src/api/stats/prometheus.rs
index 3baa125..30bb966 100644
--- a/src/api/stats/prometheus.rs
+++ b/src/api/stats/prometheus.rs
@@ -181,6 +181,9 @@ fn traffic_series(traffic: &PeerTraffic) -> Vec<(&'static str, &'static str, Cou
series
}
+/// A per-peer incident counter: its name, its help and how to read it.
+type IncidentSeries = (&'static str, &'static str, fn(&Incidents) -> f64);
+
pub(super) async fn render(state: &AppState, stats: &StatsResponse) -> String {
let mut out = Out::default();
@@ -619,7 +622,7 @@ pub(super) async fn render(state: &AppState, stats: &StatsResponse) -> String {
}
}
- let incidents: [(&str, &str, fn(&Incidents) -> f64); 4] = [
+ let incidents: [IncidentSeries; 4] = [
(
"peer_reply_timeouts_total",
"Sync messages unanswered until the reply timeout.",