Native Histograms and Pushgateway Backwards Compatibility

40 views
Skip to first unread message

Fabian Stäber

unread,
Apr 10, 2024, 2:40:20 PMApr 10
to Prometheus Developers
Hi,

I started porting the client_java Pushgateway module to the new 1.x version.

The previous implementation only supported Prometheus Text format.

Now that client_java supports native histograms, I'd like to add Protobuf format.

I'm wondering about backwards compatibility: What happens if I push a histogram (by default it's both classic and native representation) to an old Pushgateway that does not have native histogram support? If the native histogram representation just gets silently dropped that would be perfect, then I can just do it and not care about backwards compatibility. Is that the case, or could there be compatibility issues with older Pushgateways?

Fabian

Bjoern Rabenstein

unread,
Apr 11, 2024, 6:37:04 AMApr 11
to Fabian Stäber, Prometheus Developers
On 10.04.24 11:40, 'Fabian Stäber' via Prometheus Developers wrote:
>
> I'm wondering about backwards compatibility: What happens if I push a
> histogram (by default it's both classic and native representation) to an
> old Pushgateway that does not have native histogram support? If the native
> histogram representation just gets silently dropped that would be perfect,
> then I can just do it and not care about backwards compatibility. Is that
> the case, or could there be compatibility issues with older Pushgateways?

The native histogram support for PGW is tracked in
https://github.com/prometheus/pushgateway/issues/515

IIRC the only thing that is really needed (and what Jan is currently
working on) is essentially UI.

The "backend" support always worked. So if you push a protobuf
message, it will be stored as-is, and also exposed as you would
expect. Even the oldest PGW releases therefore implicitly support
native histograms. If you push a protobuf with classic and native
buckets, both will be stored and both will be exposed.

That's the current understanding. If you encounter any other behavior,
please let us know (maybe in the aforementioned issue).
--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in
Reply all
Reply to author
Forward
0 new messages