Xabaril / AspNetCore.Diagnostics.HealthChecks

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

Add async factory methods to health check DI methods. #2306

Open mitchdenny opened 1 month ago

mitchdenny commented 1 month ago

What would you like to be added:

Factory methods on checks should allow for async callbacks. I've created a PR with some context:

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/pull/2305

Why is this needed:

We are using these libraries in .NET Aspire and connection string information for health checks that are running in the AppHost are not available until after the container is built, and to acquire the connection string we need to make an async call. We are working around it at the moment, but we desire to simplify our code somewhat.