aspnet / Diagnostics

[Archived] Diagnostics middleware for reporting info and handling exceptions and errors in ASP.NET Core, and diagnosing Entity Framework Core migrations errors. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
213 stars 108 forks source link

JsonResponseWriter in Health checks assembly #523

Closed CarlosLanderas closed 6 years ago

CarlosLanderas commented 6 years ago

Hello!. My name is Carlos and I am a core team member of Beatpulse.

I would like to suggest adding a default json response writer inside HealtChecks package because retrieving the health check report instead of status codes would be a common escenario.

I don't mean this response writer should be internally registered when wiring the services but at least available in the assembly

The main motivation for this is removing a dependency from the project as right now to use BeatPulse.UI you have to install an extra package containing the client UI response writer. I think this absence will also force most HealtChecks users to implement the Json Response Writer by themselves very often.

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.UI.Client/UIResponseWriter.cs

What do you think about this idea?

Thanks

mkArtakMSFT commented 6 years ago

Thanks for contacting us, @CarlosLanderas. @rynowak thoughts?

rynowak commented 6 years ago

We discussed this during 2.2 and we have no plans to do this. If we put something in the box it won't change (ever). We definitely intend for libraries to fill this gap (or your own code).

The kind of output you want (if any) is highly dependent on what the consumer/monitoring service is. We don't want to create our own format.