-
Notifications
You must be signed in to change notification settings - Fork 89
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
support native histograms #169
Conversation
Not sure if pulling in the pushgateway dependency is acceptable. should be easy enough the copy the code if that's preferable. |
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.
Looks good. Thank you very much.
Just the dependency on the pushgateway seems really out of place.
Thinking about it, we cannot share code from prometheus/prometheus, because the latter is using gogo-protobuf, while we are using the official Go protobuf library via prometheus/client_model. Furthermore, prometheus/prometheus is using jsoniter for performance reason, while we are using just vanilla json marshaling here.
In the not too far future, we'll migrate prometheus/prometheus to a still maintained high-performance protobuf library. Maybe that would be a good time to also move all our other protobuf usage to that same, yet to be chosen library… From that perspective, the protobuf related code here is temporary, and it would maybe OK to just copy it for the time being.
Alternatively, maybe a histogram
subdirectory in prometheus/common/model might be a good place to share the code.
My gut feeling is, let's copy for now.
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 | ||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc |
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.
Is this update (to a specific hash) required?
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.
I didn't specifically update this. I'll copy the pushgateway for now, that should fix this dependency update too.
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.
This comes via the prometheus/prometheus
dependency.
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.
OK, so not our fault… 🤷
Another thing: Could you also update https://github.com/prometheus/prom2json?tab=readme-ov-file#json-format with a section that contains a native histogram? |
Hmm not sure I understand how protobuf factors into this. The |
f7dc838
to
adb4a9d
Compare
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
adb4a9d
to
330e8fb
Compare
You are doing the right thing WRT protobuf. I was just hoping we could re-use even more code, but prometheus/prometheus is using https://github.com/prometheus/prometheus/blob/main/prompb/io/prometheus/client/ rather than |
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.
Thank you very much.
Fixes: #125