-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix(inputs.diskio): Handle counter wrapping in io fields #17411
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
fix(inputs.diskio): Handle counter wrapping in io fields #17411
Conversation
… avoid sparse metrics
srebhan
left a comment
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.
Thanks for approaching this @skartikey! A suggestion for a less invasive change...
bb95589 to
9342a97
Compare
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Summary
Fixes counter wraparound issue in diskio plugin that was causing io_util, io_svctm, and io_await metrics to occasionally produce massive values in the trillions instead of expected decimal values.
Root cause: Lines calculating deltas like
deltaIOTime := float64(io.IoTime - lastValue.IoTime)don't account for counter wraparound scenarios.Example
Before (with bug)
After (during wraparound detection):
After (normal operation resumes):
Checklist
Related issues
resolves #17408