summaryrefslogtreecommitdiffstats
path: root/src/api/stats/prometheus.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 20:48:08 +0100
committertv <tv@krebsco.de>2026-10-26 20:48:08 +0100
commit8414f96f27b059c4536ae67ddfce18dec54e7451 (patch)
tree49d0aadd01b12f03242817c662c938b75e2efbb3 /src/api/stats/prometheus.rs
parent53baaff5d7c1c9fd62cf0e94bcb86120edd699b6 (diff)
add remake stats
Diffstat (limited to 'src/api/stats/prometheus.rs')
-rw-r--r--src/api/stats/prometheus.rs46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/api/stats/prometheus.rs b/src/api/stats/prometheus.rs
index 3709ea4..6fd37a0 100644
--- a/src/api/stats/prometheus.rs
+++ b/src/api/stats/prometheus.rs
@@ -257,6 +257,52 @@ pub(super) async fn render(state: &AppState, stats: &StatsResponse) -> String {
);
}
+ let remakes = &stats.remakes;
+ out.single(
+ "remakes_undecided",
+ "gauge",
+ "Remakes of the local epoch not decided yet (expired ones included).",
+ remakes.undecided as f64,
+ );
+ out.single(
+ "remakes_committed",
+ "gauge",
+ "Committed remakes of the local epoch: 1 while switching; more is a double commit.",
+ remakes.committed as f64,
+ );
+ out.single(
+ "rejoining",
+ "gauge",
+ "1 while syncing a newer epoch from scratch.",
+ flag(remakes.rejoining),
+ );
+ out.single(
+ "catch_up_attempts",
+ "gauge",
+ "Attempts at catching up with a newer epoch (0 when not catching up).",
+ remakes.catch_up_attempts as f64,
+ );
+ out.single(
+ "quarantined",
+ "gauge",
+ "Quarantined change sets (in memory only).",
+ remakes.quarantined as f64,
+ );
+ if let Some(secs) = remakes.oldest_quarantine_secs {
+ out.single(
+ "oldest_quarantine_seconds",
+ "gauge",
+ "Age of the oldest quarantined change set.",
+ secs as f64,
+ );
+ }
+ out.single(
+ "archived_epochs",
+ "gauge",
+ "Old epochs' documents kept in memory.",
+ remakes.archived_epochs as f64,
+ );
+
let topology = &stats.topology;
out.single(
"neighbours_target",