-
Notifications
You must be signed in to change notification settings - Fork 66
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
allow exposing meta information for registered metrics #61
Conversation
New public method `ExposeMetadata` allows enabling exposition of dummy meta-info for all exposed metrics across all Sets. This feature is needed to improve compatibility with 3rd-party scrapers that require meta information to be present. This commit doesn't update exposition of default system/process metrics to keep the list of changes small. This change should be added in a follow-up commit. #48
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
==========================================
+ Coverage 85.89% 89.30% +3.40%
==========================================
Files 11 12 +1
Lines 936 991 +55
==========================================
+ Hits 804 885 +81
+ Misses 109 76 -33
- Partials 23 30 +7 ☔ View full report in Codecov by Sentry. |
@valyala one thing I didn't account for is using counters as gauges, as you do here:
I think, this makes this PR useless when used like this. |
@hagen1778 , thanks for the pull request! |
The commit b23fdf5 adds support for // Create a gauge with nil callback
g := metrics.NewGauge(gaugeName, nil)
// Set newValue to the gauge
g.Set(newValue) |
…l` metrics This allows exposing the correct TYPE metadata for these labels when the app runs with -metrics.exposeMetadata command-line flag. See VictoriaMetrics/metrics#61 (comment) for more details. This is follow-up for 326a77c
…l` metrics This allows exposing the correct TYPE metadata for these labels when the app runs with -metrics.exposeMetadata command-line flag. See VictoriaMetrics/metrics#61 (comment) for more details. This is follow-up for 326a77c
New public method
ExposeMetadata
allows enabling exposition of dummy meta-info for all exposed metrics across all Sets.This feature is needed to improve compatibility
with 3rd-party scrapers that require meta information to be present.
This commit doesn't update exposition of default system/process metrics to keep the list of changes small. This change should be added in a follow-up commit.
#48