-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
More verbose error logs for collecting monitoring metrics #6429
More verbose error logs for collecting monitoring metrics #6429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment concerning the original value and the error messages.
libbeat/cmd/instance/metrics.go
Outdated
@@ -149,7 +149,7 @@ func getCPUUsage() (float64, *process.Ticks, error) { | |||
|
|||
totalCPUUsage, ok := iTotalCPUUsage.(float64) | |||
if !ok { | |||
return 0.0, nil, fmt.Errorf("error converting value of CPU usage since start") | |||
return 0.0, nil, fmt.Errorf("error converting value of CPU usage since start to float64") | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the original value of totalCPUUsage
to the message would be useful when debugging. Same with the other casting for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM WFSG
We will need that for 6.2 I have added the |
* libbeat: more info error messages && fixes * libbeat: add variable of failing conversion to message (cherry picked from commit baa740d)
I removed the label, as backport pr has been opened. |
…) (elastic#6437) * libbeat: more info error messages && fixes * libbeat: add variable of failing conversion to message (cherry picked from commit e8c6e8b)
Closes #6426