[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
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.
Updated this and cleaned up the logging. I logged an issue to consider the logging further, I don't think what's there is good enough but I don't want to drill into as part of fixing DI.
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.