Skip to content
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 for the OpenMetrics format #400

Open
atheriel opened this issue Apr 14, 2021 · 3 comments
Open

Support for the OpenMetrics format #400

atheriel opened this issue Apr 14, 2021 · 3 comments

Comments

@atheriel
Copy link

Feature request

Currently the Pushgateway can only accept and emit metrics using Prometheus's original text format. There is no support for the new OpenMetrics format, even though Prometheus itself (and a growing number of clients) are moving to this format.

I don't have a strong argument for this feature, other than the merits of the OpenMetrics format itself -- in particular I'd love to have support for exemplars.

In addition, since Pushgateway uses Prometheus's own Golang libraries, this is probably not too hard to achieve -- it has been supported with an opt-in flag since 1.4.0, released more than a year ago.

@beorn7
Copy link
Member

beorn7 commented Apr 15, 2021

The feature request is legitimate, but it depends on support in https://github.com/prometheus/common . The latter already has https://github.com/prometheus/common/blob/main/expfmt/openmetrics_create.go , which is used by client_golang to expose OpenMetrics (if so requested, and within certain limitations). However, what's missing is https://github.com/prometheus/common/blob/main/expfmt/openmetrics_parse.go , i.e. parsing OpenMetrics text format into protobuf DTOs. (The OpenMetrics parser in Prometheus itself is different as it directly parses OpenMetrics into the form needed for ingestion into TSDB.)

@atheriel
Copy link
Author

That makes sense.

@jcarrag
Copy link

jcarrag commented Sep 5, 2024

(For those waiting for this like me) work for this has started here prometheus/common#669 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants