-
Notifications
You must be signed in to change notification settings - Fork 927
Add all Go runtime metrics #997
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
Add all Go runtime metrics #997
Conversation
Signed-off-by: dongjiang <[email protected]>
|
Thanks for the PR! Looking at the docs (and at the metrics that the exporter currently exports), I think thee two are already included in the default registry: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #997 +/- ##
==========================================
- Coverage 80.59% 80.46% -0.14%
==========================================
Files 19 19
Lines 2948 2953 +5
==========================================
Hits 2376 2376
- Misses 460 465 +5
Partials 112 112 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 15504448026Details
💛 - Coveralls |
Thanks @oliver006 review Differences: change to ref: https://github.com/prometheus/client_golang/blob/main/prometheus/registry.go#L60-L63 |
Thanks for highlighting the diff. What does that effectively mean? What metrics are we getting with that ^^^ that we're currently missing out on. On the one hand I like being explicit about initializing the Registry, on the other hand I like using the DefaultRegistry because it means I'm going with the defaults and if something new is added to the defaults then I'll automagically pull it in when upgrading the client_golang dependency. Thoughts? |
|
I had another look at this and I think this is fine. Thanks for the PR and sorry for the delay! |
|
From my observations, this change adds ~150 new metrics per each scrape, which is not huge, but after this change go internal metrics are responsible for 1/6 of all metrics coming from exporter. It's possible to drop all of them with I think it might make sense to have additional flag to provide only mimimal runtime metrics with only first option, which adds only 7 additional metrics VS 209 now. Metrics: I can prepare PR for this if this sounds good. |
|
I think that makes sense. So why not go the other way around and add a flag "extended go metrics" (or similar) which defaults to false and that would enable the full set of 209 metrics. |
Yep, I think that would the best option. |
|
Created issue to track it and PR with fix:
Please review when have time. |
expose all Go runtime metrics like GC stats, memory stats etc.