From 19bc0fbf4e148430064bd040bfe0db25ab137555 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 24 Oct 2026 06:29:59 +0200 Subject: add per peer incident stats --- src/api/peers.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/api/peers.rs') diff --git a/src/api/peers.rs b/src/api/peers.rs index 9ed11c5..5b7d576 100644 --- a/src/api/peers.rs +++ b/src/api/peers.rs @@ -16,7 +16,7 @@ use utoipa::ToSchema; use super::store_status; use crate::document::replica::Epoch; use crate::document::store; -use crate::state::{AppState, HelloState, Liveness, PeerState, unix_millis}; +use crate::state::{AppState, HelloState, Incidents, Liveness, PeerState, unix_millis}; use crate::swarm::peer::forgotten_path; use crate::transport::traffic::PeerTraffic; @@ -69,6 +69,7 @@ pub(crate) struct PeerStatus { /// Messages and payload bytes exchanged with it, by kind, since we started (or /// since it was last listed). traffic: PeerTraffic, + incidents: Incidents, } #[derive(Debug, Serialize, ToSchema)] @@ -147,6 +148,7 @@ pub(crate) async fn list_peers( neighbour, rtt_ms, traffic, + incidents: ps.incidents, }); } -- cgit v1.3.1