Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
4.08k stars 797 forks source link

HealthChecks UI timeline is not showing for the group when a check starts as Unhealthy #1837

Open SSantiagoDev opened 1 year ago

SSantiagoDev commented 1 year ago

What happened: HealthChecks UI timeline is not showing for the group when a check starts as Unhealthy

What you expected to happen: The timeline should always be displayed if there are some changed statuses (healthy to unhealthy for ex).

How to reproduce it (as minimally and precisely as possible):

.AddCheck(name: "Always Unhealthy", () => HealthCheckResult.Unhealthy())
.AddCheck(name: "Random",
   () =>
   {
      int rndValue = rnd.Next(0, 10);
      return rndValue % 2 == 0 ? HealthCheckResult.Healthy() : HealthCheckResult.Unhealthy();
   });

If you change the first check to Healthy or Degraded, then we have a timeline on the Random check.

Source code sample: https://github.com/grschtroumpf/HealthChecksUI-Issue/blob/DemoIssue/src/ProductService/Startup.cs

Anything else we need to know?:

Environment:

sungam3r commented 1 year ago

PR is welcome.