-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 processes collector long int parsing #2112
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SuperQ
force-pushed
the
superq/debug_processes_errors
branch
from
August 6, 2021 03:44
0ae3c07
to
47e9b77
Compare
Update procfs library to include ignored fields ParseInt handling. Wrap error returns so that the user can know more about what failed. Returns from getAllocatedThreads() are errors anyway. Fixes: #2110 Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ
force-pushed
the
superq/debug_processes_errors
branch
from
August 6, 2021 03:56
47e9b77
to
5d2a4cf
Compare
SuperQ
changed the title
Wrap error returns in proccesses collector
Fix processes collector long int parsing
Aug 6, 2021
SuperQ
commented
Aug 6, 2021
@@ -118,8 +118,8 @@ func (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, er | |||
level.Debug(c.logger).Log("msg", "file not found when retrieving stats for pid", "pid", pid, "err", err) | |||
continue | |||
} | |||
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid, "err", err) | |||
return 0, nil, 0, err | |||
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid.PID, "err", err) |
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.
Perhaps we can drop this debug line, as the return of this func is an error anyway.
roidelapluie
approved these changes
Aug 6, 2021
SuperQ
added a commit
that referenced
this pull request
Aug 6, 2021
* [BUGFIX] Fix processes collector long int parsing #2112 Signed-off-by: Ben Kochie <superq@gmail.com>
Merged
SuperQ
added a commit
that referenced
this pull request
Aug 6, 2021
* [BUGFIX] Fix processes collector long int parsing #2112 Signed-off-by: Ben Kochie <superq@gmail.com>
Merged
oblitorum
pushed a commit
to shatteredsilicon/node_exporter
that referenced
this pull request
Apr 9, 2024
* [BUGFIX] Fix processes collector long int parsing prometheus#2112 Signed-off-by: Ben Kochie <superq@gmail.com>
oblitorum
pushed a commit
to shatteredsilicon/node_exporter
that referenced
this pull request
Apr 9, 2024
* [BUGFIX] Fix processes collector long int parsing prometheus#2112 Signed-off-by: Ben Kochie <superq@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update procfs library to include ignored fields ParseInt handling.
Wrap error returns so that the user can know more about what failed.
Returns from getAllocatedThreads() are errors anyway.
Fixes: #2110
Signed-off-by: Ben Kochie superq@gmail.com