aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/stats/prometheus.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 00:56:24 +0100
committertv <tv@krebsco.de>2026-11-05 00:56:24 +0100
commit4c6604db27f26998b72fd815b6bd1de5a3b08780 (patch)
treef95b90cadaeeaa7f085c352836a3017a33cf672b /src/api/stats/prometheus.rs
parent85c6a9a2ddeaf23066ddfa3362693604a37526ae (diff)
own tree shape
Diffstat (limited to 'src/api/stats/prometheus.rs')
-rw-r--r--src/api/stats/prometheus.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/api/stats/prometheus.rs b/src/api/stats/prometheus.rs
index 595466a..db3cef3 100644
--- a/src/api/stats/prometheus.rs
+++ b/src/api/stats/prometheus.rs
@@ -713,6 +713,32 @@ pub(super) fn render(stats: &StatsResponse, list: &PeerListResponse) -> String {
"Current neighbours with the stable tier.",
view.stable_neighbours as f64,
);
+ if let Some(tree) = &view.own_tree {
+ out.single(
+ "own_tree_members",
+ "gauge",
+ "Other members in this node's own writer's tree.",
+ tree.members as f64,
+ );
+ out.single(
+ "own_tree_depth",
+ "gauge",
+ "Most hops from this node to a member along its own writer's tree.",
+ f64::from(tree.depth),
+ );
+ out.single(
+ "own_tree_mean_depth",
+ "gauge",
+ "Mean hops from this node to a member along its own writer's tree.",
+ tree.mean_depth,
+ );
+ out.single(
+ "own_tree_off_members",
+ "gauge",
+ "Members this node's own writer's tree doesn't reach (they get its writes by announcement).",
+ tree.off_tree as f64,
+ );
+ }
}
let stability = &stats.stability;