client-rust: Make Histogram::observe calls atomic across collects

11 views
Skip to first unread message

Max Inden

unread,
Apr 5, 2020, 8:31:39 AM4/5/20
to prometheus...@googlegroups.com, Max Leonard Inden
Hi everyone,

With Prometheus v2.17.0 queries can only see full scrapes, but they
could still access inconsistent data if the scrape itself is inconsistent.

This needs to be prevented at the target side. Thanks to Björn the
Prometheus Golang client prevents this for histograms by introducing the
notion of a hot and a cold shard preventing collect and observe calls to
interleave [1].

I have ported this mechanism to the Prometheus Rust client. Given that
it is a rather involved patch I would very much appreciate any
additional reviewers. The more eyes the better.

https://github.com/tikv/rust-prometheus/pull/314

Thanks for the help.
Max

---

[1] https://github.com/prometheus/client_golang/pull/457

signature.asc
Reply all
Reply to author
Forward
0 new messages