-
Notifications
You must be signed in to change notification settings - Fork 31
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
Inconsistent: Summary and Histogram deal with dimensional values differently than Counter #77
Comments
Hmmm, yeah we should definitely strive for consistent behavior; I don't know which way is the right one to correct towards though, we'd have to check other impls and see. |
I've simplified the tests a bit and compared to the official Go client so that we see what an official implementation returns. The testsIn Swift, the test file looks like this:
In Go, the test file looks like this:
The resultsTest counterSwift:
Go:
Test histogramSwift:
Go:
I hope this helps. |
Thank you @armandgrillet! That’s an awesome contribution! |
See also #80 which includes a possible fix in the link. |
When I was using the Summary and Histogram type I noticed, that if I record a value for a metric with name and dimensions, the value is also recorded for the dimension less version of the metric. This is in contrast to the Counter, where an increment on a Counter that was created with a dimension, does not increment the dimension less counter.
We should have a consistent behavior here. @ktoso do you know by any chance what is correct?
Steps to reproduce
Environment
SwiftPrometheus: 1.0.0
The text was updated successfully, but these errors were encountered: