-
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] Get custom metrics working in inventory alerts with limited UI #75073
[Metrics UI] Get custom metrics working in inventory alerts with limited UI #75073
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
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.
Everything works as expected. Can you add some tests? I would like to see some stuff around the changes to the following files:
public/alerting/inventory/components/expression.tsx
server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts
@simianhacker I started trying to add tests for the inventory executor when I pushed this PR but ended up running into a lot of issues with mocking the Snapshot API. Would it be okay if we deferred adding tests to this executor until after we've switched over to the Metrics API? That's probably easier to mock |
💚 Build SucceededBuild metricsasync 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.
Yes... we can wait till that's switched over. Thanks for adding the tests.
Switching release note to enhancement since the full custom metrics UI isn't making it into 7.10. |
Summary
Part of #65761
This PR:
In order to create an alert with a custom metric, you need to first add the custom metric using the toolbar on the Inventory page in order to make it available in the alert flyout. There is no UI to create custom metrics from the alert flyout itself, and it will only use the Inventory page's
WaffleOptionsState
as a source of truth for its list of custom metrics. Therefore, this PR does not enable you to create custom metric alerts on the Alert Management page. You can, however, edit alerts that were previously created with custom metrics.I think this is a good incremental push, but to fully close this issue we need to figure out what the UI should look like in order to define custom metrics in the alert flyout.
Tagged with
release_note:skip
because I think we should generate a release note from the final UI implementation.Checklist