Health Checks - Register path/options with dependency injection
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is your feature request related to a problem? Please describe.
This feature would directly support development efforts on:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1058
When adding health checks using `IApplicationBuilder.UseHealthChecks`, the values of path and `HealthCheckOptions` are only used to map `HealthCheckMiddleware`. After the middleware is registered, there is no way to retrieve this information at runtime.
### Describe the solution you'd like
To have [HealthCheckApplicationBuilderExtensions.cs](https://github.com/aspnet/AspNetCore/blob/master/src/Middleware/HealthChecks/src/Builder/HealthCheckApplicationBuilderExtensions.cs) refactored in a non-breaking way so that the path and `HealthCheckOptions` information is accessible at runtime (preferably via dependency injection).
Contributor guide
Assessment
This issue has not been assessed yet.