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

[Discover] Add support for default histogram breakdown fields and custom breakdown colour mappings #194549

Open
stratoula opened this issue Oct 1, 2024 · 3 comments
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.

Comments

@stratoula
Copy link
Contributor

stratoula commented Oct 1, 2024

📓 Summary

For the Discover logs data source profile, we want to set the default histogram breakdown field to log.level (and do similar for other profiles in the future). Additionally, we want to assign specific colour mappings and ordering to the breakdown values to better represent the data to users:
Image

There are two separate tasks needed to support this in the contextual awareness framework:

  • The getDefaultAppState extension point should be updated to allow defining a breakdown field as part of the default profile state.
  • A new extension point should be added to Discover to support defining custom breakdown colour mappings, e.g. getBreakdownColorMappings, including custom ordering. The extension point should be separate from the default profile state because it should possible for a single profile to define colour mappings for multiple fields, not just the default breakdown field. The custom ordering portion of this work is blocked by custom breakdown ordering in Lens: [Lens] Custom Breakdown Presentation Order #191988.

Currently a PoC exists demonstrating how this could work for ES|QL mode, but the log.level field is hard coded and does not use an extension point: #190213. It can be used as a reference for how colour mappings can be passed to the Lens embeddable.

✔️ Acceptance criteria

  • Update the getDefaultAppState extension point to support defining a default histogram breakdown field.
  • Add a new extension point in Discover to support defining custom breakdown colour mappings, including custom sorting. The extension point should allow a single profile to define custom colour mappings for multiple fields.
  • Ensure the changes work in both ES|QL mode and data view mode.
  • Document the extension point changes, and add example profile implementations as well as functional tests for the new functionality.
@stratoula stratoula added 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. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Oct 1, 2024
@elasticmachine
Copy link
Contributor

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

@stratoula
Copy link
Contributor Author

I didnt add the blocked label because there is an open PR already and we can def start working on it without this feature.

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

kertal commented Oct 9, 2024

elastic/elastic-charts#2524 has been merged 🥳

@davismcphee davismcphee changed the title [ES|QL] [Discover] Initialize the histogram breakdown with a contextual field [Discover] Add support for default histogram breakdown fields and custom breakdown colour mappings Nov 4, 2024
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.
Projects
None yet
Development

No branches or pull requests

4 participants