Store various metrics (sum,count,etc) as aggregate_metric_double
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
In 7.11 Elasticsearch added an `aggregate_metric_double` field type:
> Stores pre-aggregated numeric values for metric aggregations. An aggregate_metric_double field is an object containing one or more of the following metric sub-fields: min, max, sum, and value_count.
We could consider doing this for breakdown and span metrics as well. Storage cost might be lower but selfishly/more importantly, it means we can just use an avg aggregation on a field rather than a sum + count aggregation and some Kibana-side post-processing:
> When you run certain metric aggregations on an aggregate_metric_double field, the aggregation uses the related sub-field’s values. For example, a min aggregation on an aggregate_metric_double field returns the minimum value of all min sub-fields.
This field type is also used by rollups I think.
See https://www.elastic.co/guide/en/elasticsearch/reference/master/aggregate-metric-double.html
Contributor guide
Assessment
This issue has not been assessed yet.