-
Notifications
You must be signed in to change notification settings - Fork 76
Add a Prometheus-compatible Histogram function, and convert the vmrange label to the le label #45
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
Conversation
this pr is ready for review, but it is waiting on this PR VictoriaMetrics/metrics#45 so that we do not need to use a replace directive.
|
any news here ? what can be done to help get this PR merged ? |
|
Hello @greyireland @clementnuss! |
|
@hagen1778 that's a good point and in that case it may make more sense to add Prometheus style static buckets based Histogram in order to be fully compatible. |
|
@neal @greyireland do you plan to create fully prometheus compatible variant? my use-case - i don't like prometheus because it have many allocations with protobuf based structure creating, encoding... |
|
@valyala can you help? in this case this package can be used for k8s metrics exporting as prometheus client have huge memory usage |
as a follow-up/alternative to #45 and to solve #28, I'm starting this PR which adds support for [OTLP histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#histogram) (the common `le` - static bucket type of histograms, not the complex exponential histograms/native histograms). I know that VM focus is on log based buckets and really appreciate those, but having the opportunity to use "normal" histograms with this library would be greatly appreciated, as documented in #28 before working too much on this, I'd like to know whether support for normal / OTLP style buckets could be considered or not. I don't want to spend too much time on this PR if at the end @valyala @hagen1778 you decide against such a feature. I'd also like to start a discussion on the name. I picked `OTLPHistogram` in reference to the histograms described in the OpenTelemetry Protocol, but perhaps the naming is bad. [EDIT]: I think that `CompatibleHistogram` would make more sense than `OTLPHistogram`, had not thought about it until after I started implementing the functions currently the basic functionality is implemented, and a testcase covers a simple usage. if there is a decision in favor of this PR, I will add the missing testcases and complete the implementation (add a function for custom buckets/upper bounds for example) --------- Co-authored-by: Roman Khavronenko <[email protected]> Co-authored-by: hagen1778 <[email protected]>
|
@vtolstov @neal @greyireland pull request #93 has been merged. Starting from v1.38.0 metrics package supports PrometheusHistogram metric type. See examples how to use it here https://github.com/VictoriaMetrics/metrics/blob/master/prometheus_histogram_example_test.go Additionally, package exports ExponentialBuckets and LinearBuckets helpers for convenience of generating static buckets. |
|
Closing this PR in favour of #93. |
No description provided.