From 208ea60836cfc98857cf3359a73d8874ed5d935a Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 9 Jan 2026 14:23:44 +0000 Subject: refactor(sync): rename ConnectedDegraded to ConnectedHistoricSyncFailures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves naming conflict with RelayHealthState::Degraded by using a more explicit name that clearly indicates the connection status relates to historic sync failures, not connection health degradation. Changes: - ConnectionStatus::ConnectedDegraded → ConnectedHistoricSyncFailures - Updated all documentation and comments - Updated Prometheus metric descriptions - Metric value remains 4 for backward compatibility This makes it clear that: - ConnectedHistoricSyncFailures = connection lifecycle (missing historic data) - RelayHealthState::Degraded = connection health (reliability issues) These are orthogonal concerns - a relay can be ConnectedHistoricSyncFailures but Healthy, or Connected but Degraded. --- src/sync/metrics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sync/metrics.rs') diff --git a/src/sync/metrics.rs b/src/sync/metrics.rs index 0f56911..7907d8e 100644 --- a/src/sync/metrics.rs +++ b/src/sync/metrics.rs @@ -53,7 +53,7 @@ impl SyncMetrics { let relay_connected = IntGaugeVec::new( Opts::new( "ngit_sync_relay_connected", - "Relay connection status (0=disconnected, 1=connecting, 2=syncing, 3=connected, 4=connected_degraded)", + "Relay connection status (0=disconnected, 1=connecting, 2=syncing, 3=connected, 4=connected_historic_sync_failures)", ), &["relay"], )?; @@ -208,7 +208,7 @@ impl SyncMetrics { /// - Connecting = 1 (connection attempt in progress) /// - Syncing = 2 (connected, historic sync in progress) /// - Connected = 3 (connected, historic sync complete) - /// - ConnectedDegraded = 4 (connected, historic sync failed but live sync active) + /// - ConnectedHistoricSyncFailures = 4 (connected, historic sync had failures but live sync active) /// /// This is separate from health state and provides more granular connection lifecycle tracking. /// @@ -223,7 +223,7 @@ impl SyncMetrics { ConnectionStatus::Connecting => 1, ConnectionStatus::Syncing => 2, ConnectionStatus::Connected => 3, - ConnectionStatus::ConnectedDegraded => 4, + ConnectionStatus::ConnectedHistoricSyncFailures => 4, }; self.relay_connected .with_label_values(&[relay]) -- cgit v1.2.3