Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IHealthCheck for netcoreapp3.1 + net6.0 #658

Open
snakefoot opened this issue Mar 28, 2021 · 5 comments
Open

Add support for IHealthCheck for netcoreapp3.1 + net6.0 #658

snakefoot opened this issue Mar 28, 2021 · 5 comments
Labels
ASP.NET Core ASP.NET Core - all versions feature up-for-grabs

Comments

@snakefoot
Copy link
Contributor

snakefoot commented Mar 28, 2021

Something similar to these:

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/tree/master/src

Maybe something like this:

  • Setup static capture of NLog.InternalLogger-events on Warning and Error-Level.
  • Keeps tracks of alert count per NLog Target within the last 10 minutes.
  • Reports all NLog Targets (or NLog Core) that have generated alerts within the last 10 minutes (Automatically expire old alerts).
@snakefoot snakefoot added this to the 5.0 milestone Mar 28, 2021
@snakefoot snakefoot added the ASP.NET Core ASP.NET Core - all versions label Mar 28, 2021
@snakefoot snakefoot removed this from the 5.0 milestone Mar 30, 2021
@snakefoot snakefoot changed the title Add support for IHealthCheck for netcoreapp3.0 + net5.0 Add support for IHealthCheck for netcoreapp3.1 + net5.0 Oct 5, 2021
@bakgerman
Copy link
Contributor

is this still desired? I am preparing pull requests for AspNetCore.Diagnostics.HealthChecks for IBM DB2 and MQ so I am somewhat familiar. I can try and build a prototype.

@snakefoot
Copy link
Contributor Author

snakefoot commented Dec 10, 2022

I think it is still interesting to have diagnostics from the NLog-targets, and maybe also basic-statistics about logged-errors-per-minute-by-host-application.

@bakgerman
Copy link
Contributor

There are several locations to place the health check classes

One is in NLog.Web.AspNetCore itself, this will require 1 or 2 additional NuGet package dependencies added, for the IHealthCheck and related interfaces. But as these are official Microsoft NuGet packages this may be OK.

One is in a separate project named NLog.Web.AspNetCore.HealthChecks. This will have only the 1 or 2 NuGet dependencies, but will also have very few classes (an extension class, and a class to implement the actual check) so not sure it deserves a project.

The last one is to host the NLog.Web.AspNetCore.HealthChecks in the https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks repo, where there are many others...but then we will not be master maintainer of the project and cannot makes PR and release ourselves.

As the HealthCheck NuGet packages state they support net std 2.0 and net 4.6.1, we 'may' be able to support that as well, but certainly core 3.1/5.0/6.0 they support.

@snakefoot
Copy link
Contributor Author

snakefoot commented Dec 20, 2022

Are the HealthChecks-dependencies not included by default when project is using:

<FrameworkReference Include="Microsoft.AspNetCore.App" />

I'm ok with only adding HealthCheck-support for only some platforms like NET6, can see the following screenshot:

image

@bakgerman
Copy link
Contributor

Good point, yes if we skip netstd 20/4.6.1 then is auto included. then we can leave in the project with no changes.

@snakefoot snakefoot changed the title Add support for IHealthCheck for netcoreapp3.1 + net5.0 Add support for IHealthCheck for netcoreapp3.1 + net6.0 Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASP.NET Core ASP.NET Core - all versions feature up-for-grabs
Projects
None yet
Development

No branches or pull requests

2 participants