Skip to content

[pkg/winperfcounters] Improve error when a performance counter fails to scrape #14443

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

Closed
BinaryFissionGames opened this issue Sep 22, 2022 · 2 comments · Fixed by #14450
Closed
Assignees
Labels

Comments

@BinaryFissionGames
Copy link
Contributor

BinaryFissionGames commented Sep 22, 2022

Is your feature request related to a problem? Please describe.

When a performance counter fails to scrape, the IIS receiver logs that an error occurred, along with the error, but not with which counter the error occurred. This information is useful because it helps to understand what metric might be missing.

See:

rcvr.params.Logger.Warn("some performance counters could not be scraped; ", zap.Error(err))

Describe the solution you'd like

Place the counter path in in the error returned by the PerfCounterWatcher; This will give more context to the error which will aid in debugging issues on live systems.

Describe alternatives you've considered

I considered just logging it in the IIS receiver, but it would be more helpful to have this information in any receiver where this can fail. Adding this information to the error is more useful.

Additional context

No response

@BinaryFissionGames BinaryFissionGames added enhancement New feature or request needs triage New item requiring triage labels Sep 22, 2022
@BinaryFissionGames
Copy link
Contributor Author

I'll be looking into making this change

@github-actions
Copy link
Contributor

Pinging code owners: @dashpole @Mrod1598 @BinaryFissionGames. See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants