-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
hostmetricsreceiver doc updates and logging #2038
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2038 +/- ##
==========================================
- Coverage 92.23% 92.22% -0.01%
==========================================
Files 280 280
Lines 16996 17001 +5
==========================================
+ Hits 15676 15679 +3
- Misses 905 906 +1
- Partials 415 416 +1
Continue to review full report at Codecov.
|
Yea I was being very conservative re logging. This change probably makes sense, given that typical scrape intervals are once every 10s-5m. Should we add this logging to the scraper controller instead though so that errors are logged by default for all scrapers? |
Also, for the other part of this PR, should we disable the scraper (i.e. report an error if you try to use it) on Mac as well? (and add |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@jrcamp can you rebase? |
CPU metrics are not available in gopsutils on Mac when cgo is disabled (https://github.com/shirou/gopsutil/blob/master/cpu/cpu_darwin_nocgo.go) Errors were not logged which lead to confusion about why things weren't working.
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
Two thoughts that don't need to be addressed in this PR:
- It might be useful to make this logging optional?
- Can you create an issue for disabling the cpu scraper on darwin
Would this be an option in ScraperControllerSettings?
Ah yeah. Created #2143. Looks like disk also has the same problem (updated readme). |
I was thinking it's something developers would want to configure per scraper type rather than users needing to configure this directly, but maybe. |
CPU and disk metrics are not available in gopsutils on Mac when cgo is disabled
(https://github.com/shirou/gopsutil/blob/master/cpu/cpu_darwin_nocgo.go)
Errors were not logged which lead to confusion about why things weren't
working. @james-bebbington was this intentional or unintentional? It does
spam the logs a bit (every collection interval) but I don't think we can fully
rely on users checking traces for errors.