-
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
[receiver/hostmetrics] should report scraper that failed in case of error #35814
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I'm not sure why, but all the scraper creation code uses |
I agree. We should mention the scraper that failed |
#### Description This PR changes each scraper's factory to create a scraper with the scraper's name. This is to ensure that logs from the `scrapercontroller` will contain the name of the scraper. #### Link to tracking issue Fixes #35814 #### Testing New unit tests Built the collector with `cpu` scraper modified to immediately return an error and got the following message: ``` 2024-10-16T14:58:46.396Z error scraperhelper/scrapercontroller.go:205 Error scraping metrics {"kind": "receiver", "name": "hostmetrics", "data_type": "metrics", "error": "hi i failed", "scraper": "cpu"} ```
Component(s)
receiver/hostmetrics
Is your feature request related to a problem? Please describe.
In case of error the
receiver/hostmetrics
doesn't report which scraper failed, e.g.:Describe the solution you'd like
The error message should include the scraper name so the user can consider disabling it or changing some config setting.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: