Skip to content

Conversation

@salvatore-campagna
Copy link
Contributor

@salvatore-campagna salvatore-campagna commented Jul 14, 2022

For metric fields of type aggregate_double_metric, we would like to return all metric values such as
max, min, sum and value_count for a gauge, instead of returning just the value for the default metric.

Context

In the past, we had taken the decision to expose fields of type aggregate_metric_double as regular double fields in the fields API by only returning the default_value metric sub-field. This decision intended to hide the complexity of this field from Kibana and only expose it as a simple numeric field. After recent discussions with the Kibana team, we decided that Elasticsearch should be transparent as to when a field is an aggregate_metric_double field. Elasticsearch should return all metric sub-fields and Kibana will deal with managing the field type.

Consequences

This is a breaking change

Relates to #74660

@salvatore-campagna salvatore-campagna added >non-issue :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data :StorageEngine/TSDB You know, for Metrics labels Jul 14, 2022
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jul 14, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@salvatore-campagna
Copy link
Contributor Author

@elasticmachine test this please

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - a lot simpler than I thought it would need to be!

@salvatore-campagna
Copy link
Contributor Author

I will merge this after the other one...because this will give me some merge conflicts and I prefer to fix merge conflicts here rather than in the other just because this is simpler.

indices.get:
index: test

- do:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to have those tests in the rollups code, but perhaps it would be simpler to test aggregate_metric_double field in isolation at the more basic aggregate-metrics yaml tests


- match: { hits.hits.3.fields.metricset.0: pod }
- match: { hits.hits.3.fields.count.0: 16 }
- match: { hits.hits.3.fields.k8s\.pod\.network\.tx.0.min: 1.434587694E9 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, those tests should be skipped on all versions before 8.4.0

@sethmlarson sethmlarson added the Team:Clients Meta label for clients team label Jul 18, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/clients-team (Team:Clients)

Copy link
Contributor

@csoulios csoulios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

metricset:
type: keyword
time_series_dimension: true
count:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this field being used anywhere in this test. Is this a left over?

@elasticsearchmachine elasticsearchmachine removed the Team:Clients Meta label for clients team label Jul 20, 2022
@elasticsearchmachine elasticsearchmachine changed the base branch from master to main July 22, 2022 23:05
@salvatore-campagna
Copy link
Contributor Author

@elasticmachine update branch

@csoulios
Copy link
Contributor

@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking >non-issue :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants