From 59e8cf0dd415458c16e867a3dbe1711c6981371f Mon Sep 17 00:00:00 2001 From: jasontaylordev Date: Tue, 19 May 2026 15:51:10 +1000 Subject: [PATCH] Fix IsStale to be true only when all endpoint instances are stale --- .../Infrastructure/Api/EndpointMetricsApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceControl.Monitoring/Infrastructure/Api/EndpointMetricsApi.cs b/src/ServiceControl.Monitoring/Infrastructure/Api/EndpointMetricsApi.cs index 4ec8e32e9c..c47223ab2e 100644 --- a/src/ServiceControl.Monitoring/Infrastructure/Api/EndpointMetricsApi.cs +++ b/src/ServiceControl.Monitoring/Infrastructure/Api/EndpointMetricsApi.cs @@ -201,7 +201,7 @@ static MonitoredEndpoint[] GetMonitoredEndpoints(EndpointRegistry endpointRegist { Name = endpoint.Key, EndpointInstanceIds = endpoint.Value.Select(i => i.InstanceId).ToArray(), - IsStale = endpoint.Value.Any(activityTracker.IsStale), + IsStale = endpoint.Value.All(activityTracker.IsStale), ConnectedCount = endpoint.Value.Count(id => !activityTracker.IsStale(id)), DisconnectedCount = endpoint.Value.Count(activityTracker.IsStale) })