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

[Dataset quality] Filters for timeRange, integrations and datasetQuery #176611

Merged
merged 28 commits into from
Feb 19, 2024

Conversation

yngrdyn
Copy link
Contributor

@yngrdyn yngrdyn commented Feb 9, 2024

Relates to #170242

📝 Summary

This PR introduces a set of filters for the table inside the dataset quality page. With these changes users now will be able to filter by timeRange, integrations and dataset name.
As part of this work, we had implemented the URL schema in the consumer observability log explorer, so anyone could share the current state of the page with others.

💡For Reviewers

State Machine

The changes is the state machine includes new events to handle the update of the selected integrations, selected query, selected timeRange and refreshing the data when changing the timeRange (or using the autorefresh in the timerange component).

image

@kbn/timerange

This package was added to handle timerange utilities, in particular it exposes two functions getDateRange and getISODateRange that helps converting from timeranges like { from: 'now-24h', to: 'now'} into their respective timestamps or ISO string dates.

✅ Testing

  1. Navigate to /app/observability-logs-explorer/dataset-quality
  2. The filters are displayed above the datasets tables

🎥 Demos

  • Normal Scenario
Screen.Recording.2024-02-19.at.16.01.39.mov
  • Auto Refresh
Screen.Recording.2024-02-19.at.16.36.45.mov
  • Sharing URL
Screen.Recording.2024-02-19.at.16.39.37.mov

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@yngrdyn yngrdyn marked this pull request as ready for review February 14, 2024 07:36
@yngrdyn yngrdyn requested a review from a team as a code owner February 14, 2024 07:36
@yngrdyn yngrdyn added the release_note:skip Skip the PR/issue when compiling release notes label Feb 14, 2024
@yngrdyn yngrdyn force-pushed the 170242-timeframe-selector branch from b9c0301 to 000986c Compare February 14, 2024 11:40
@yngrdyn yngrdyn force-pushed the 170242-timeframe-selector branch from 6c3ab47 to 8fd4bdb Compare February 14, 2024 14:59
@yngrdyn yngrdyn self-assigned this Feb 14, 2024
@mohamedhamed-ahmed
Copy link
Contributor

I played around with the PR and got some questions:

  • Should the time filter also apply to the Size column in the table, so that I see the size in the specified time range?
  • Should we maybe allow the search bar to filter more than just the dataset name? I see the AC says searches the dataset name by default but what if I want to filter all dataset with size>20mb for example
  • I am unable to select 2 datasets from different integrations together using the search bar, is there a way we can achieve this?
  • Should we maybe rename the None to Uncategorized?
  • Filtering and removing the filters, rerequests the table data again. Do we really need to do this? especially if the user has so many datasets this will take a long time as they search and remove the search.

@mohamedhamed-ahmed
Copy link
Contributor

The page contents shift a bit when the table content changes, can we keep this fixed as it feels a bit annoying

TableColumnsResizing.mov

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Feb 15, 2024

Should we maybe allow the search bar to filter more than just the dataset name? I see the AC says searches the dataset name by default but what if I want to filter all dataset with size>20mb for example

I am unable to select 2 datasets from different integrations together using the search bar, is there a way we can achieve this?

We are quite limited regarding the search bar, mainly because of the DataStreams API, there we are only able to filter using a pattern

Should we maybe rename the None to Uncategorized?

This was already discussed in the figma file.

Filtering and removing the filters, rerequests the table data again. Do we really need to do this? especially if the user has so many datasets this will take a long time as they search and remove the search.

This is good point! I'll take a look on this one

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Feb 15, 2024

As we discussed offline, I will switch to UI filtering instead of going to our endpoint and filter using the dataStreams API, filtering in the UI will give more flexibility than just having a pattern. Users for example would be able to filter two datasets that comes from different integrations with a multi select (as they can do for example for integrations)

@yngrdyn yngrdyn enabled auto-merge (squash) February 19, 2024 10:39
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

LGTM!! Great work 🚀

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
datasetQuality 156 167 +11

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/timerange - 8 +8

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
datasetQuality 118.8KB 136.3KB +17.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
datasetQuality 29.9KB 31.4KB +1.5KB
observabilityLogsExplorer 12.8KB 12.9KB +151.0B
total +1.7KB
Unknown metric groups

API count

id before after diff
@kbn/timerange - 8 +8

async chunk count

id before after diff
datasetQuality 8 9 +1

ESLint disabled line counts

id before after diff
datasetQuality 9 10 +1

Total ESLint disabled count

id before after diff
datasetQuality 11 12 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @yngrdyn

@yngrdyn yngrdyn merged commit c54dfc3 into elastic:main Feb 19, 2024
34 checks passed
@kibanamachine kibanamachine added v8.14.0 backport:skip This commit does not require backporting labels Feb 19, 2024
@yngrdyn yngrdyn linked an issue Feb 20, 2024 that may be closed by this pull request
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
elastic#176611)

Closes elastic#170242

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@yngrdyn yngrdyn added the Team:obs-ux-logs Observability Logs User Experience Team label Mar 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dataset quality] Add dataset filters
6 participants