-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Duplicate logging ID and name in health checks #46099
Comments
Similar to #46072 |
Ah, I hadn't seen that. The difference is those duplicates look like accidents. Health checks look like it was intentionally designed with duplicates. |
Also note that there are duplicate Ids for HealthCheckPublisherError and HealthCheckPublisherTimeout. aspnetcore/src/HealthChecks/HealthChecks/src/HealthCheckPublisherHostedService.cs Lines 201 to 202 in 6a6d775
aspnetcore/src/HealthChecks/HealthChecks/src/HealthCheckPublisherHostedService.cs Lines 236 to 245 in 6a6d775
|
What would be the possible reason for deliberately duplicating the event IDs here? I think it would be good to fix this but I have two thoughts:
|
This was likely done because the logs are basically for the same thing, an error occurred during aspnetcore/src/HealthChecks/HealthChecks/src/HealthCheckPublisherHostedService.cs Lines 183 to 190 in 6a6d775
|
They are semantically different though. A timeout (notified via a cancellation exception) is very different to an exception that you also happen to record an elapsed time for. (not doubting your reasoning though ;P) |
Is there an existing issue for this?
Describe the bug
Health checks reuses a logging ID and name for end events at different log levels. We don't do this anywhere else in ASP.NET Core.
aspnetcore/src/HealthChecks/HealthChecks/src/DefaultHealthCheckService.cs
Lines 220 to 229 in 4535ea1
Expected Behavior
I think we should have different log messages for different events to be consistent with the rest of the logging.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: