-
Notifications
You must be signed in to change notification settings - Fork 376
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
Init metrics to zero #139
Init metrics to zero #139
Conversation
@siimon I pushed a fix for summaries, and added a snapshot test for full output. Working on the case with labels |
Great! Thanks! :) |
Ok, should be done now. Had to revert most of the test changes when considering labels |
122907a
to
ce6f52f
Compare
LGTM! |
@dm3 @paulborza does this look correct? You can check the snapshot test for output with and without labels. https://github.com/siimon/prom-client/pull/139/files#diff-23be0e4ea533e57b2bd533eaddfed48c |
@SimenB why initialize the metrics only when there are no labels? The metrics should be initialized to 0 across all labels. |
How would you do that since you don't know the values for the labels? You only know the label names when you create the metric |
@siimon You're right; my bad. The output looks good for metrics with no labels. Thanks for fixing this! :) |
Once merged, can you also publish the new version to the registry? Thanks |
Of course 🙂 |
Fixing #118
Added fixes for Counters, Gauges and Histograms.. Summary I'm not sure what to do about tbh.. After a quick look it's not an easy fix.