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

[Metrics UI] Consolidate Inventory and Metrics Explorer APIs #71575

Closed
wants to merge 6 commits into from

Conversation

simianhacker
Copy link
Member

@simianhacker simianhacker commented Jul 14, 2020

Summary

The Metrics Explorer API and Snapshot API essential are doing the same things except the Metric Explorer API can't be used by the Alerts system because it utilizes TSVB (which requires a valid request object). The surface area of bringing parity to the Snapshot API is smaller than updating TSVB to NOT use the request object.

Snapshot API Gap:

  • Paginate through results
    • add limit and afterKey support
  • Aggregate across everything
    • introduce "ALL" nodeType
  • Support auto and >=1m intervals
    • add getBucketSize (and test) from TSVB, this is only honored if forceInterval is used
  • Two modes
    • Paginate by groupings
    • Paginate by groupings and date_histogram
  • Remove references to source from getNodes
    • When we send logRate we need to change the indexPattern for useSource to the logsAlias
  • Add caches to createTimeRangeWithInterval
  • Add caches to getIndexFields

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@simianhacker simianhacker added Feature:Metrics UI Metrics UI feature v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Jul 14, 2020
@simianhacker simianhacker added this to the Metrics UI 7.10 milestone Jul 14, 2020
@sgrodzicki
Copy link

@simianhacker does this fix #71539?

@simianhacker
Copy link
Member Author

@sgrodzicki It donesn't, that issue is for the frontend. In the new default view feature there is a call to useSnapshot that sends the request immediately when it shouldn't.

@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 6, 2020

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle.ConditionalToolTip should just work

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(jest.fn()).toBeCalledWith(...expected)

- Expected
+ Received

  "{\"bool\":{\"filter\":{\"match_phrase\":{\"host.name\":\"host-01\"}}}}",
  [{"type": "cpu"}, {"type": "memory"}, {"type": "tx"}, {"type": "rx"}],
  [],
  "host",
- "metricbeat-*",
+ "host.name",
- "@timestamp",
+ "metricbeat-*",
- 1596747066927,
+ "@timestamp",
- "",
+ 1596747066927,
  "",
- false,
+ "",
+ false,

Number of calls: 1
    at Object.it (/dev/shm/workspace/kibana/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx:126:31)
    at Promise (/dev/shm/workspace/kibana/node_modules/jest-circus/build/utils.js:198:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/dev/shm/workspace/kibana/node_modules/jest-circus/build/utils.js:162:10)
    at _callCircusTest (/dev/shm/workspace/kibana/node_modules/jest-circus/build/run.js:205:40)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Build metrics

✅ unchanged

History

  • 💔 Build #64547 failed 87df6667789732874933ab221cf485a227feb8b1
  • 💔 Build #61201 failed 9294c834761ce6cb069df584f5a205959fa98e82

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

@simianhacker
Copy link
Member Author

Closing in favor of #74804

@simianhacker simianhacker deleted the consolidate-apis branch April 17, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants