Xabaril / AspNetCore.Diagnostics.HealthChecks

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

Put UIHealthReport in .NET Standard 2.0 library to support NET Framework 4.8 #2192

Open omccully opened 3 months ago

omccully commented 3 months ago

What would you like to be added:

Make a separate package that contains UIHealthReport, UIHealthReportEntry, UIHealthStatus, and perhaps the JSON serialization.

Why is this needed:

A lot of apps still run on .NET Framework 4.8 and will continue to do so.

The UIHealthReport is the interface that allows apps to report their state. Right now it's in a package that targets .net 6, so I cannot use it in an older .NET Framework app.   We have a lot of .NET apps. Some are .NET Core, and some are old .NET Framework. We set up health checks just fine for the newer .NET apps using the UIResponseWriter, but there's no reusable code for generating this JSON response that is compatible with .NET Framework 4.8. A lot of the other health check code supports .NET Standard 2.0.

I'll try ASPNetCore.Healthchecks.UI.Core v3.1.3 because that targets .NET Standard 2.0 and see how that goes, or I'll copy the code and put it in my own package for now. However, it would be nice if there was a separate maintained and supported package.

HeedfulCrayon commented 1 month ago

Another idea that sort of goes hand in hand with this is the ability to add a remote healthcheck endpoint that can be consumed and generate the UI. For instance I have Service A with all of it's dependencies that will display in a "HealthCheck" call. That json could be consumed and displayed in the UI HealthChecks to show Service A as service where you can expand and view the state of all of the dependencies. This would allow me to run an old .net framework application but produce json that my healthcheck project would expect and be able to consume