HealthCheck Logging incorrectly passes ElapsedMillisecond and HealthStatus parameters #32523
Labels
area-healthchecks
Includes: Healthchecks (some bugs also in Extensions repo)
bug
This issue describes a behavior which is not expected - a bug.
Milestone
Describe the bug
In the .NET 6.0 beta builds, health check logging lists elapsed milliseconds where status should be. This appears to be due to the change implemented by #26575 adjusted the format string but not the parameters passed to the log message.
The parameters are passed in here: https://github.com/dotnet/aspnetcore/blob/v6.0.0-preview.3.21201.13/src/HealthChecks/HealthChecks/src/DefaultHealthCheckService.cs#L253 and duration.TotalMilliseconds just needs to be replaced with entry.Status
To Reproduce
Start with an aspnet project using .NET 6, add a health check endpoint. Start the project and hit the health check endpoint.
Exceptions (if any)
Further technical details
.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.2.21155.3
Commit: 1a9103db2d
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-preview.2.21155.3\
Host (useful for support):
Version: 6.0.0-preview.2.21154.6
Commit: 3eaf1f316b
The text was updated successfully, but these errors were encountered: