Support for the OpenMetrics format
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.
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.)
That makes sense.
(For those waiting for this like me) work for this has started here https://github.com/prometheus/common/pull/669 🎉