Skip to content

Log heartbeat duration for slow heartbeats #15273

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

Merged
merged 2 commits into from
Nov 5, 2019

Conversation

Kahbazi
Copy link
Member

@Kahbazi Kahbazi commented Oct 22, 2019

Fixes #12760

@halter73 halter73 merged commit 911f92c into dotnet:master Nov 5, 2019
@halter73
Copy link
Member

halter73 commented Nov 5, 2019

Thanks!

@springy76
Copy link

In which netcore version will this finally show up? 3.1.6 still shows old text without duration.

@Tratcher
Copy link
Member

The change is only in 5.0 previews.

@Tratcher Tratcher added this to the 5.0.0 milestone Aug 11, 2020
@Kahbazi Kahbazi deleted the kahbazi/heartbeat branch August 11, 2020 12:31
@nblumhardt
Copy link

Just a heads-up, this introduced a small bug, the parameters to the log event are out of order, so the messages are nonsensical.

LoggerMessage.Define<TimeSpan, TimeSpan, DateTimeOffset>(LogLevel.Warning, new EventId(22, nameof(HeartbeatSlow)), @"As of ""{now}"", the heartbeat has been running for ""{heartbeatDuration}"" which is longer than ""{interval}"". This could be caused by thread pool starvation.")

Should be DateTimeOffset (now), TimeSpan (heartbeatDuration), TimeSpan (interval).

@ghost
Copy link

ghost commented Mar 30, 2021

Hi @nblumhardt. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@BrennanConroy
Copy link
Member

Thanks, we've already fixed it up in 6.0 and are backporting the fix to 5.0 #31080

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HeartbeatSlow warning missing context
9 participants