-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Metrics UI] Remove TSVB dependency from Metrics Explorer APIs #74804
[Metrics UI] Remove TSVB dependency from Metrics Explorer APIs #74804
Conversation
05ff5e0
to
f15f325
Compare
f15f325
to
ad02fdf
Compare
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
…with-metric-api-for-metrics-explorer
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.
Couple style nits but looks good overall
x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/unit_to_seconds.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/unit_to_seconds.ts
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts
Outdated
Show resolved
Hide resolved
…ponents/chart_title.tsx Co-authored-by: Zacqary Adam Xeper <[email protected]>
…ize/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]>
…ize/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]>
…buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]>
…buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]>
…nterval_for_metrics.ts Co-authored-by: Zacqary Adam Xeper <[email protected]>
…with-metric-api-for-metrics-explorer
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.
Small typo in how many days are in a year
x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/unit_to_seconds.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Zacqary Adam Xeper <[email protected]>
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
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.
Checked out and tested this and it seems to be working! Thanks for doing this!
…ic#74804) * [Metrics UI] Remove TSVB dependency from Metrics Explorer APIs * Update x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Fixing some names, changing some units * Reverting TSVB calculate_auto; fixing names in infra * Fixing translation names * Fixing typo Co-authored-by: Zacqary Adam Xeper <[email protected]> Co-authored-by: Zacqary Adam Xeper <[email protected]>
… (#75017) * [Metrics UI] Remove TSVB dependency from Metrics Explorer APIs * Update x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts Co-authored-by: Zacqary Adam Xeper <[email protected]> * Fixing some names, changing some units * Reverting TSVB calculate_auto; fixing names in infra * Fixing translation names * Fixing typo Co-authored-by: Zacqary Adam Xeper <[email protected]> Co-authored-by: Zacqary Adam Xeper <[email protected]> Co-authored-by: Zacqary Adam Xeper <[email protected]>
* master: (23 commits) Adding API test for custom link transaction example (elastic#74238) [Uptime] Singular alert (elastic#74659) Revert "attempt excluding a codeowners directory" (elastic#75023) [Metrics UI] Remove TSVB dependency from Metrics Explorer APIs (elastic#74804) Remove degraded state from ES status service (elastic#75007) [Reporting/Functional] unskip pagination test (elastic#74973) [Resolver] Stale query string values are removed when resolver's component instance ID changes. (elastic#74979) Add public url to Workplace Search plugin (elastic#74991) [Reporting] Update more Server Types for TaskManager (elastic#74915) [I18n] verify select icu-message options are in english (elastic#74963) Make data.search.aggs available on the server. (elastic#74472) [Security Solution][Resolver] Graph Control Tests and Update Simulator Selectors (elastic#74680) attempt excluding a codeowners directory [ML] DF Analytics: allow failed job to be stopped by force via the UI (elastic#74710) Add kibana-core-ui-designers team (elastic#74970) [Metrics UI] Fix inventory footer misalignment (elastic#74707) Remove legacy optimizer (elastic#73154) Update design-specific GH code-owners (elastic#74877) skip test Reporting paginates content elastic#74922 [Metrics UI] Add Jest tests for alert previews (elastic#74890) ...
Summary
This PR removes the TSVB dependency from Metrics Explorer and introduces a new library called "Metrics API". The goal of this library is to create a replacement backend for both the Metrics Explorer, Snapshot APIs, and alert executors. This new library supports the following features:
>=1m
as TSVBHere is an example of how to use this new service.
One of the goals of this new service is to provide a consistent way to query time series metrics from anywhere with in the Metrics UI app. The search client function can be swapped out with a function (with the same signature,
ESSearchClient
) that makes calls using a search strategy.I plan to turn the Metrics API into a Search Strategy in a separate PR which will make using this library even more ubiquitous. I'm also going to submit a follow up PR to use this API for the backend for the Snapshot API.
Testing this PR
The goal of this PR is to go unnoticed by the user. The only change to the integration test was the ID field when the user didn't specify any group by's. Before this change it returned "Everything" as the ID, now it returns
*
and we display the "Everything" title only in the UI when it matches this value.Checklist
Delete any items that are not applicable to this PR.