-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Logs UI] Sync logs timerange with wider Kibana #79444
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
[Logs UI] Sync logs timerange with wider Kibana #79444
Conversation
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
weltenwort
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty clean and the time range sync between the tabs feels pretty convenient. 👍
I'm a bit concerned about the semantic changes to the default time ranges. While defaulting to the last 15 minutes seems fine for the logs stream, this value seems impractical for the anomalies and categories tabs. With a bucket span of 15 minutes for the ML jobs there is a high change of not getting any meaningful results on the default view.
No good solution comes to mind, but here are some ideas:
- don't include the anomalies and categories tabs in the sync
- display a warning about the time range being too small for meaningful results
In an unrelated thought, while looking at the data plugin's timefilter service, I noticed it also supports syncing the refresh interval. Would it make sense to also include that?
|
(Note: this is being deferred until the defaults situation can be addressed) |
…eranges-with-wider-kibana
|
Following the semantics change, comment here: #79444 (review) I've pushed changes to try and address the defaults situation. There were some additional things to consider when I started the implementation, I've highlighted these below:
Logs side:
I think this covers everything 🤔 |
weltenwort
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really elegant and seems to work flawlessly - well done 👏
I wonder if the useSync... hook could subsume the other hook once the old url sync component is gone from the logs stream. 🤔 But for now the separation makes sense 👍
x-pack/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx
Outdated
Show resolved
Hide resolved
.../infra/public/pages/logs/log_entry_categories/use_log_entry_categories_results_url_state.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_rate_results_url_state.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx
Outdated
Show resolved
Hide resolved
Yep, I think once everything is on |
Co-authored-by: Felix Stürmer <[email protected]>
…e_log_entry_categories_results_url_state.tsx Co-authored-by: Felix Stürmer <[email protected]>
…entry_rate_results_url_state.tsx Co-authored-by: Felix Stürmer <[email protected]>
…eranges-with-wider-kibana
- Move decision of using defaults to the solution consumer - Add unit tests
Dosant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppArch code LGTM
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Sync logs timestamps with wider Kibana Co-authored-by: Felix Stürmer <[email protected]>
* Sync logs timestamps with wider Kibana Co-authored-by: Felix Stürmer <[email protected]>
* master: (23 commits) Table visualization renderer (elastic#79455) Migrate Jest JUnit reporter to TS (elastic#79919) store sorted bundleRefExportIds (elastic#80011) update chromedriver dependency to 86.0.0 (elastic#79972) [Security Solution][Case] Fix bug when changing connectors (elastic#80002) [kbn/std] add observable helpers to aid with rxjs 7 upgrade (elastic#79752) [Security Solution][Resolver] Pill numbers in compact notation (elastic#80038) [Logs UI] Sync logs timerange with wider Kibana (elastic#79444) [DOCS] Adds quick start (elastic#78822) [Ingest Manager]Fix ingest manager UI renaming (elastic#80036) [Monitoring] Fixed internal monitoring check (elastic#79241) [Security Solution][Exception Modal] Removes list operators in exception modal for EQL rules (elastic#79871) Update development documentation about REST API best practices (elastic#80009) [Monitoring] Improve indices loading against larger metricbeat-* indices (elastic#79190) [CI] Move kibana build dir outside of repo for functional tests (elastic#80018) [kbn/optimizer] bump low or add missing limits when updating automatically (elastic#80013) [Enterprise Search] Added a Credentials page to App Search (elastic#79749) [DOCS] Canvas refresh for 7.10 (elastic#80017) [TSVB] Add ignore global filters to series options (elastic#79337) Remove this check (elastic#79202) ...
Summary
This PR implements #79299. It ensures all logs pages (stream, anomalies, and categories) sync their timeranges with wider Kibana, via the data plugin.
The order of precedence now becomes:
(these shouldn't be needed as the time filter service sets defaults based off the Kibana setting)Semantics changeThe changes here alter the semantics of the defaults used. Previously the defaults were as follows:
now - 1dnow - 2wnow - 2wNow, the default will be the default set by the time filter service (unless, of course, the user has interacted with the time range and set a new one) when it is instantiated. The default used by the time filter service is from the
timePicker.timeDefaultssetting under Advanced Settings. This defaults tonow - 15m, and as such the default for the logs pages becomesnow - 15m, unless the user has set something else.(I have also kept our original defaults in an
||clause but these shouldn't ever be used, it was more in case something went wrong, but if something has gone wrong with the data plugin there are much bigger problems 🤷♀️)Testing
Time ranges should sync between wider Kibana (Discover etc) and all logs pages. This should be two-way.