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

[ES|QL] [Unified histogram] Add a breakdown dropdown to the ES|QL histogram #186369

Closed
stratoula opened this issue Jun 18, 2024 · 9 comments
Closed
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:OneDiscover Enrich Discover with contextual awareness Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@stratoula
Copy link
Contributor

stratoula commented Jun 18, 2024

Describe the feature:

We want to give the users the ability to create breakdowns in ES|QL histogram mode. We decided to not go with inlinestats but keep the stats implementation and add a breakdown in the histogram component (exactly as in dataview mode) that it will update the underlying query on field selection

The latter is very important for the OneDiscover project. If we have the context, we want programmatically to breakdown the histogram with a specific field defined by the Discover app. We can't do it without inline stats support

image (49)

@stratoula stratoula added blocked enhancement New value added to drive a business result impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana labels Jun 18, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula stratoula added Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Jun 18, 2024
@elasticmachine
Copy link
Contributor

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

@kertal kertal added the Project:OneDiscover Enrich Discover with contextual awareness label Jun 18, 2024
@kertal
Copy link
Member

kertal commented Jun 18, 2024

@stratoula @ninoslavmiskovic I've got a question about the breakdown by log levels using ES|QL. In Lens / data view mode using Breakdown / Filters we can group terms like error,Error,Err, into error by using one filter, with colors by terms mapping we can assign the right color for the severity. Is there a way to do this in ES|QL?

Context: #186273

@stratoula
Copy link
Contributor Author

stratoula commented Jun 18, 2024

@kertal sorry what do you mean with by using one filter?

with colors by terms mapping we can assign the right color for the severity. --> yes of course

Update: I see now what you mean. Yes we will be able to do so (with inlinestats and the case function). This is why I added this task to our team, it is better if we take the query construction part. From the moment we have the breakdown field then the color mapping works the same as in the dataview mode.

@kertal
Copy link
Member

kertal commented Jun 18, 2024

@stratoula great thx! Out of curiosity, how will and ES|QL query for something like this look like?

@stratoula
Copy link
Contributor Author

It will be quite complex, I need inlinestats first to be sure how it will look like. Patience!

@stratoula
Copy link
Contributor Author

First step is this PR #189630 (it just replaces stats with inlinestats) on the histogram query enabling the rest of the fields to be present in the inline editing breakdown. I am not releasing this yet because inhlinestats is still only present on snapshots releases (this is why the tests are failing)

@stratoula
Copy link
Contributor Author

stratoula commented Aug 9, 2024

Second step is this PR #190213 where it initializes the histogram with the log.level column if it exists.

This is blocked by the fact that we would like to order the bars and legend by severity but this doesnt seem possible now at Lens. cc @MichaelMarcialis

@nickofthyme we had discussed it, not sure if you discussed it with the team and can give us an update here. cc @elastic/kibana-visualizations

@stratoula stratoula added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Aug 9, 2024
@stratoula stratoula changed the title [ES|QL] [Unified histogram] Use inline stats instead of stats to create the date histogram [ES|QL] [Unified histogram] Add a breakdown dropdown to the ES|QL histogram Sep 18, 2024
@stratoula stratoula removed the blocked label Sep 18, 2024
stratoula added a commit that referenced this issue Oct 1, 2024
)

## Summary

Part of #186369

It enables the users to breakdown the histogram visualization in
Discover.


![meow](https://github.com/user-attachments/assets/d5fdaa41-0a69-4caf-9da2-1221dcfd5ce2)


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 1, 2024
…tic#193820)

## Summary

Part of elastic#186369

It enables the users to breakdown the histogram visualization in
Discover.

![meow](https://github.com/user-attachments/assets/d5fdaa41-0a69-4caf-9da2-1221dcfd5ce2)

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit dfe00f2)
@stratoula
Copy link
Contributor Author

The first part got merged #193820. This enables the breakdown from the histogram.

The next part is to initialize the breakdown by log.level. We discussed it with the @elastic/kibana-data-discovery team and they are going to take it. With that being said, I am closing this issue and will create a new one to track the one discover requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:OneDiscover Enrich Discover with contextual awareness Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants