IHealthCheckPublisher allows you to configure and run health checks
regularly inside an application, and push the notifications elsewhere.
All publishers are part of a single queue with a configurable period and
timeout.
* Allow health checks to use any DI lifetime
This change allows registered IHealthCheck implementations to use any DI
lifetime. This is necessary for scenarios like using EF which requires a
scope.
The works by having the health check service create a scope for each
time it queries health checks. This scope does not overlap or share
state with other scopes (the request scope) so there is no crosstalk
between processing going on per-request in ASP.NET Core and the health
check operation.
* PR feedback and some logging cleanup
A bunch of small changes and updates for 2.2 focused at making our main
scenarios more streamlined and focused. Also adds samples for
extensibility we support so far.
A list of changes:
Clearing baselines for these projects. We didn't ship anything in 2.1 so
there should be nothing in the baselines.
--
The middleware now uses Map for path matching. This makes the actual
`HealthCheckMiddleware` more standalone. This will make it easy to use
with Dispatcher/Endpoint Routing in the future.
This also manifests by removing Path from HealthCheckOptions - the path
is an explicit argument to the UseHealthChecks middelware - this
streamlines the design for 3.0.
--
Added extensibility for customizing the status codes (aspnet/Home#2584)
--
Added extensibility for writing the textual output (aspnet/Home#2583)
--
Changed the default output to be `text/plain`. The most common use cases
for health checks don't include a detailed status.
The existing output format is still available as an option.