From 4c6604db27f26998b72fd815b6bd1de5a3b08780 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Nov 2026 00:56:24 +0100 Subject: own tree shape --- src/api/stats/prometheus.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/api/stats/prometheus.rs') 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; -- cgit v1.3.1