Deprecate aggregate metric double default metric configuration#141877
Merged
gmarouli merged 24 commits intoelastic:mainfrom Feb 12, 2026
Merged
Deprecate aggregate metric double default metric configuration#141877gmarouli merged 24 commits intoelastic:mainfrom
gmarouli merged 24 commits intoelastic:mainfrom
Conversation
4 tasks
7 tasks
Collaborator
|
Hi @gmarouli, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
romseygeek
approved these changes
Feb 6, 2026
Contributor
romseygeek
left a comment
There was a problem hiding this comment.
One question, but LGTM otherwise.
...in/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateMetricDoubleFieldMapper.java
Show resolved
Hide resolved
Contributor
Author
|
anyone from @elastic/obs-ds-intake-services would like to review this? |
carsonip
reviewed
Feb 10, 2026
Member
carsonip
left a comment
There was a problem hiding this comment.
thanks, code change lgtm. Awaiting confirmation from UI team whether the queries / aggs on our aggregate_metric_double fields would be affected by the future change default_metric to avg.
carsonip
approved these changes
Feb 11, 2026
Member
carsonip
left a comment
There was a problem hiding this comment.
approving to unblock, based on the understanding:
- only avg is used on transaction.duration.summary
- only value_count and sum are used on event.success_count
limotova
reviewed
Feb 12, 2026
...in/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateMetricDoubleFieldMapper.java
Outdated
Show resolved
Hide resolved
gmarouli
added a commit
that referenced
this pull request
Feb 25, 2026
In this PR we replace the "derived metric" introduced in #141877 with a script average or if the `aggregate_metric_double` has only one metric, with that metric. We support the following scenarios: - Single metric: we introduce the concept of a single metric, this is set only if the aggregate_metric_double has only one value. We saw this being used in tests when we aggregate using the min or max, but we did provide full support just in case it's used. - Average is available: when aggregate_metric_double has the sum and value_count then we calculate the average. This is used in scripts, sorting and filtering queries. Finally, we return no results in filtering, if none of the above apply. Part of #128356
smalyshev
pushed a commit
to smalyshev/elasticsearch
that referenced
this pull request
Feb 25, 2026
In this PR we replace the "derived metric" introduced in elastic#141877 with a script average or if the `aggregate_metric_double` has only one metric, with that metric. We support the following scenarios: - Single metric: we introduce the concept of a single metric, this is set only if the aggregate_metric_double has only one value. We saw this being used in tests when we aggregate using the min or max, but we did provide full support just in case it's used. - Average is available: when aggregate_metric_double has the sum and value_count then we calculate the average. This is used in scripts, sorting and filtering queries. Finally, we return no results in filtering, if none of the above apply. Part of elastic#128356
This was referenced Feb 25, 2026
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 2, 2026
In #141877, we deprecated the `default_metric` of an `aggregate_metric_double`. However, the following tests (#142544, #142964, #142410 & #142477) seem to encounter this warning even if they are not expected to set the `default_metric`. In this PR, we did the following: - For #142544, we added the api group information in the warning failure exception, so that a yaml test will not only log the warning but it will also share more info about the api call. - For the other two, we catch the exception in `FieldExtractorTestCase` and log the mapping of the index, we hope that this can help us trace if there was a template used or not. - We also unmute the test because we cannot reproduce them locally.
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
In elastic#141877, we deprecated the `default_metric` of an `aggregate_metric_double`. However, the following tests (elastic#142544, elastic#142964, elastic#142410 & elastic#142477) seem to encounter this warning even if they are not expected to set the `default_metric`. In this PR, we did the following: - For elastic#142544, we added the api group information in the warning failure exception, so that a yaml test will not only log the warning but it will also share more info about the api call. - For the other two, we catch the exception in `FieldExtractorTestCase` and log the mapping of the index, we hope that this can help us trace if there was a template used or not. - We also unmute the test because we cannot reproduce them locally.
This was referenced Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR we deprecate the usage of the
default_metricin theaggregate_metric_double. This consists of:maxor another available metric to filter, display value and sort.