Commit 3bcc996
authored
Summary sketch (#177)
This uses now ddskerl, an implementation of the DDSketch algorithm, instead of quantile_estimator, which is in turn an implementation of Cormode's biased algorithms.
The most important difference is that the biased algorithms aren't mathematically mergeable, hence keeping a per-scheduler summary would never work, and keeping a single global one would never scale (and not mentioning race conditions on inserts as the data-structure is not possible to treat atomically in an ets table). Instead, the DDSketch algorithm is fully mergeable, and the data structure implementation has an ETS backend fully tested for all sorts of race conditions.
As a possibility that is out of the scope of this PR, a custom exporter might provide the Sketch data structure to datadog, so that the quantile merges can be done on the server, and that way the metrics server can aggregate quantiles across many hosts in a meaningful way.
-------
List of commits:
* Optimise convert_du time helper
* Reimplement summaries using ddskerl
* Fix formatting tests
* Make quantile summary table read_concurrent
* Upgrade ddskerl
* Introduce wide width to quantile summaries
* Fix dependency starting functions
* Avoid introducing breaking changes to default exported quantiles
* Increase quantile summary test coverage
* Fix gauge and coverage for prometheus_time:maybe_convert_to_du/2
* Fix helper called for quantile loop
* Upgrade ddsketch
* Support ddsketch bucketing when using histograms
Note that DataDog supports exporting prometheus histograms as DataDog
Distributions.
* Optimise histograms
* Fix bug with correctly converting to duration units
* Simplify and unify loop_through_keys helper
* Fix TODO in documentation for ddsketch buckets1 parent 02df2e1 commit 3bcc996
14 files changed
Lines changed: 467 additions & 318 deletions
File tree
- src
- metrics
- test/eunit
- format
- metric
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
0 commit comments