Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HealthCheck Logging incorrectly passes ElapsedMillisecond and HealthStatus parameters #32523

Closed
mettelephant opened this issue May 9, 2021 · 3 comments
Labels
area-healthchecks Includes: Healthchecks (some bugs also in Extensions repo) bug This issue describes a behavior which is not expected - a bug.
Milestone

Comments

@mettelephant
Copy link

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

  • ASP.NET Core version: .NET 6

.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

@pranavkm pranavkm added the area-healthchecks Includes: Healthchecks (some bugs also in Extensions repo) label May 9, 2021
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label May 10, 2021
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone May 10, 2021
@ghost
Copy link

ghost commented May 10, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@danielcweber
Copy link
Contributor

Works for me in Preview 7.

@BrennanConroy
Copy link
Member

This was fixed when moving to the logging source generator #32414

@BrennanConroy BrennanConroy modified the milestones: Backlog, 6.0-preview7 Oct 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-healthchecks Includes: Healthchecks (some bugs also in Extensions repo) bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

No branches or pull requests

5 participants