prometheus.erl icon indicating copy to clipboard operation
prometheus.erl copied to clipboard

Full summary implementation

Open deadtrickster opened this issue 9 years ago • 1 comments

Now only basic variant of summary metric is implemented - with sum and count of observations.

What's left:

  • [ ] Quantiles;
  • [ ] Configurable sliding window

Prometheus summaries usually use highly biased quantile and since we deal with streaming data so they always implement the same algorithm from paper [0]. Example implementations: [1-3].

Sliding window seems to be implemented using N numbers of age-overlapped summaries maintained in parallel. Of course only 'top' one is rendered during scraping.

Due to the huge overhead maybe it's good idea to keep current simple implementation as an option?

References: 0. Effective Computation of Biased Quantiles over Data Streams

  1. Ruby Quantiles implementation
  2. Golang Quantiles implementation
  3. Common Lisp implementation
  4. Golang sliding window implementation

deadtrickster avatar Aug 15 '16 09:08 deadtrickster

So I found this: https://github.com/odo/quantile_estimator It's rather old but seems to build, at least on OTP-21. I'll take a look if it's possible to integrate to the summary metric.

hairyhum avatar Feb 03 '21 22:02 hairyhum