feat(health): metrics-stale signal + status-transition timestamps; spec now matches heartbeat-liveness code

This commit is contained in:
Joseph Doherty
2026-07-08 16:21:30 -04:00
parent 15d91d760f
commit c73b7faa11
7 changed files with 199 additions and 16 deletions
@@ -19,4 +19,17 @@ public class HealthMonitoringOptions
/// the design doc grants real sites. Default: 3x the report interval.
/// </summary>
public TimeSpan CentralOfflineTimeout { get; set; } = TimeSpan.FromMinutes(3);
/// <summary>
/// Duration an online site may go without a full health <em>report</em>
/// (heartbeats notwithstanding) before it is flagged
/// <see cref="SiteHealthState.IsMetricsStale"/>. Distinct from
/// <see cref="OfflineTimeout"/>, which is heartbeat-based liveness: a site
/// whose HealthReportSender has died keeps heartbeating and stays "online",
/// but its metrics freeze — this window surfaces that. Must be positive and
/// no shorter than <see cref="ReportInterval"/> (a window shorter than one
/// report interval would flag every healthy site). Default: 2 minutes
/// (~4 missed 30s reports).
/// </summary>
public TimeSpan MetricsStaleTimeout { get; set; } = TimeSpan.FromMinutes(2);
}