Description
Currently, when downsampling a gauge field we keep the aggregate value in a new type aggregate_metric_double which consists of min, max, sum and value_count. This type supports accurately certain aggregations but not all, see here for more info.
After #136297, we will be able to use the default_metric which currently is the max to respond to these ES|QL stats queries.
However, we believe that the average is a more representative value. Furthermore, we believe that configuring the default_metric upon index creation is often a burden to the user.
For this reasons, we propose the following:
Description
Currently, when downsampling a gauge field we keep the aggregate value in a new type
aggregate_metric_doublewhich consists ofmin,max,sumandvalue_count. This type supports accurately certain aggregations but not all, see here for more info.After #136297, we will be able to use the
default_metricwhich currently is themaxto respond to these ES|QL stats queries.However, we believe that the average is a more representative value. Furthermore, we believe that configuring the
default_metricupon index creation is often a burden to the user.For this reasons, we propose the following:
default_metric(Deprecate aggregate metric double default metric configuration #141877)default_metricQueryDSL (Aggregate metric double use average #142135)default_metricin ES|QL([ES|QL] Use avg metric for AMD default metric #141331)9.4#145742)default_metricin downsamplingdefault_metricin apm mapping templatedefault_metricin otel mapping template