Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSDB][META] Enable supported TSDB counter fields in Kibana #152912

Closed
thomasneirynck opened this issue Mar 8, 2023 · 14 comments
Closed

[TSDB][META] Enable supported TSDB counter fields in Kibana #152912

thomasneirynck opened this issue Mar 8, 2023 · 14 comments
Labels
Feature:Maps impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Meta :ml Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Mar 8, 2023

Describe the feature:

Kibana should not run unsupported aggs on TSDB counter fields.

Context

TSDB counter fields (time_series_type: "counter") do not support all aggregations. When these used, depending on the Kibana app, they can surface errors in unexpected ways.

Two options are currently being proposed:

1) Each app handles counter-fields as "special" case

The default behavior is restored:

Then, each app provides ad-hoc solution when it detects the counter-field.

e.g.:

2) Elasticsearch publishes supported aggregations

Elasticsearch publishes supported aggs in field_caps. Correspondingly, Kibana would have to change how it uses this new metadata. Depending on the app, this metadata would be treated differently as well:

  • DataVisualizer would not run averages by default
  • Lens/Maps may hide unsupported aggs as a user-option/have different defaults

A similar solution will be needed for Discover as well. It cannot hide the field. Current state is that it silently swallows an error when opening the field-preview.

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 8, 2023
@thomasneirynck thomasneirynck added :ml Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Mar 8, 2023
@thomasneirynck thomasneirynck added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Mar 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@thomasneirynck thomasneirynck mentioned this issue Mar 8, 2023
4 tasks
@thomasneirynck thomasneirynck added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Mar 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@thomasneirynck
Copy link
Contributor Author

This is blocking #130714 (ie. because counter-types need to be aggregatable)

@nreese
Copy link
Contributor

nreese commented Mar 9, 2023

There is no user facing documentation on what aggregations are supported by which TSDB fields. Either Kibana or Elasticsearch documentation needs to have a table laying out TSDB fields and supported aggregations so users can understand why options are available/unavailable in the UI.

Do you want me to open a separate issue to track? Where should this belong - in Kibana docs or Elasticsearch docs?

@droberts195
Copy link
Contributor

With option 2, Elasticsearch publishes supported aggregations, there could be a CCS complication.

elastic/elasticsearch#93884 (comment) and elastic/elasticsearch#93884 (comment) highlight the potential problem.

If a user is in a CCS environment and is searching a mixture of 8.7 and 8.8 indices then the list of supported aggregations will be empty. This might result in parts of Kibana not permitting any aggregations to be used against the fields. For counter fields this is probably fine - for CCS there's a rule that Kibana doesn't use new Elasticsearch features until 1 minor after they're introduced to avoid accidentally breaking Kibana features when CCS is being used, so it's reasonable that counter fields don't have full functionality in Kibana until the minor after the one where they're introduced. However, what mustn't happen in a mixed 8.7/8.8 CCS environment is that other fields, like simple long and keyword fields, stop working. Field caps would also report an empty list of supported aggregations for these simple fields in a mixed 8.7/8.8 CCS environment. This implies that in 8.8 no part of Kibana should take the list of supported aggregations to be the actual supported aggregations for any field types other than counter. It will cause far more user dissatisfaction if functionality that uses aggregations on simple long or keyword fields stops working in mixed 8.7/8.8 CCS environments than if the brand new feature isn't supported everywhere in Kibana in 8.8.

@nreese nreese added the Meta label Mar 9, 2023
@jsanz jsanz added loe:large Large Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Mar 9, 2023
@droberts195
Copy link
Contributor

There's a suggestion on what to do about the CCS complication in elastic/elasticsearch#93884 (comment). There are different ways to approach it, but the important thing is that there is a compatible approach between Elasticsearch and Kibana.

@thomasneirynck
Copy link
Contributor Author

Discussed this offline with @ppisljar. I'm +1 on moving with first approach, Each app handles counter-fields as "special" case for 8.8, and potentially moving forward with approach2 at a later date.

cc @martijnvg @droberts195 @jgowdyelastic @stratoula

@davismcphee
Copy link
Contributor

Apologies if I'm missing something obvious here, but does anyone know where to find a list of which aggregations are or aren't supported by counter fields?

@nreese
Copy link
Contributor

nreese commented Mar 22, 2023

Apologies if I'm missing something obvious here, but does anyone know where to find a list of which aggregations are or aren't supported by counter fields?

I was also not able to find this information and neither are our users - #152912 (comment)

@thomasneirynck
Copy link
Contributor Author

thomasneirynck commented Mar 23, 2023

@davismcphee @reese They are listed here elastic/elasticsearch#93539 (comment) . It seems @martijnvg is going to update the docs (elastic/elasticsearch#93539 (comment))

jughosta added a commit that referenced this issue Apr 6, 2023
…#154319)

Addresses #152912

## Summary

This PR makes sure that unified field list does not call unsupported
aggs for counter fields. Also the messaging will be better: instead of
`No field data for the current search.` it will show `Analysis is not
available for this field.`

<img width="586" alt="Screenshot 2023-04-04 at 10 38 29"
src="https://user-images.githubusercontent.com/1415710/229751286-d4727bcc-a1af-44a4-9684-c54f7c9b6076.png">

We might extend it later with a different view for such fields.
@ThomThomson
Copy link
Contributor

ThomThomson commented Jul 13, 2023

Removing this from the Presentation team project as it seems like our tasks here are completed in #152899.

@timductive
Copy link
Member

Closing this issue as TSDB counter fields are now supported in Kibana. Please re-open if I missed any remaining tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Maps impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Meta :ml Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

8 participants