-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Add and edit alerts outside of APM UI #106786
Comments
Pinging @elastic/apm-ui (Team:apm) |
By pulling out most of the things that depend on the URL into where we open the flyout and passing them in as metadata props, we can make it so editing rules while in Stack Management. You cannot edit a rule's service name, transaction type, or environment once it has been created (#106786 has been created to allow editing of these other values), but all other values can be edited. In order for useFetcher to work outside of the APM plugin, it has been changed to use useKibana instead of useApmContext for toast notifications. The notifications API from useKibana is slightly different and allows passing a react element instead of a mount point as the body. Fixes #76316.
By pulling out most of the things that depend on the URL into where we open the flyout and passing them in as metadata props, we can make it so editing rules while in Stack Management. You cannot edit a rule's service name, transaction type, or environment once it has been created (elastic#106786 has been created to allow editing of these other values), but all other values can be edited. In order for useFetcher to work outside of the APM plugin, it has been changed to use useKibana instead of useApmContext for toast notifications. The notifications API from useKibana is slightly different and allows passing a react element instead of a mount point as the body. Fixes elastic#76316.
By pulling out most of the things that depend on the URL into where we open the flyout and passing them in as metadata props, we can make it so editing rules while in Stack Management. You cannot edit a rule's service name, transaction type, or environment once it has been created (#106786 has been created to allow editing of these other values), but all other values can be edited. In order for useFetcher to work outside of the APM plugin, it has been changed to use useKibana instead of useApmContext for toast notifications. The notifications API from useKibana is slightly different and allows passing a react element instead of a mount point as the body. Fixes #76316. Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Free-form inputs are fine (and great for yet-to-be-collected services and/or environments) - as long as they're assisted by suggestions (as proposed in the linked issue) |
Yes to clarify I meant something like |
By pulling out most of the things that depend on the URL into where we open the flyout and passing them in as metadata props, we can make it so editing rules while in Stack Management. You cannot edit a rule's service name, transaction type, or environment once it has been created (elastic#106786 has been created to allow editing of these other values), but all other values can be edited. In order for useFetcher to work outside of the APM plugin, it has been changed to use useKibana instead of useApmContext for toast notifications. The notifications API from useKibana is slightly different and allows passing a react element instead of a mount point as the body. Fixes elastic#76316.
We have a temporary solution for alert creation with #111781 which will allow editing but not creating rules in Stack Management for 7.15. Much of alert creation is broken in master, so we're going to fix that next. |
Allow selecting any service name, transaction type (where appropriate), and environment when creating and editing rules, both in APM and Stack Management. - Create /internal/apm/suggestions endpoint that uses `terms_enum` - Use combo box for environment, service name, and transaction type with suggestions endpoint on all alerts - Remove "Go to APM" callouts on new alert creation - Wrap calls to `createCallApmApi` in alert triggers with `useEffect` - Use `getEnvironmentLabel` for value in environment field expression - Make all `AlertParams` fields optional (except in latency threshold alert) - Add e2e tests for creating an alert - Remove `NewAlertEmptyPrompt` component and `isNewApmRuleFromStackManagement` helper - Replace `maxServiceEnvironments` and `maxServiceSelections` config options with `maxSuggestions` advanced setting. ![CleanShot 2021-09-28 at 10 35 58](https://user-images.githubusercontent.com/9912/135119948-e247615a-d235-4feb-b197-b803f165ad1e.gif) Fixes #106786
Allow selecting any service name, transaction type (where appropriate), and environment when creating and editing rules, both in APM and Stack Management. - Create /internal/apm/suggestions endpoint that uses `terms_enum` - Use combo box for environment, service name, and transaction type with suggestions endpoint on all alerts - Remove "Go to APM" callouts on new alert creation - Wrap calls to `createCallApmApi` in alert triggers with `useEffect` - Use `getEnvironmentLabel` for value in environment field expression - Make all `AlertParams` fields optional (except in latency threshold alert) - Add e2e tests for creating an alert - Remove `NewAlertEmptyPrompt` component and `isNewApmRuleFromStackManagement` helper - Replace `maxServiceEnvironments` and `maxServiceSelections` config options with `maxSuggestions` advanced setting. ![CleanShot 2021-09-28 at 10 35 58](https://user-images.githubusercontent.com/9912/135119948-e247615a-d235-4feb-b197-b803f165ad1e.gif) Fixes elastic#106786
Allow selecting any service name, transaction type (where appropriate), and environment when creating and editing rules, both in APM and Stack Management. - Create /internal/apm/suggestions endpoint that uses `terms_enum` - Use combo box for environment, service name, and transaction type with suggestions endpoint on all alerts - Remove "Go to APM" callouts on new alert creation - Wrap calls to `createCallApmApi` in alert triggers with `useEffect` - Use `getEnvironmentLabel` for value in environment field expression - Make all `AlertParams` fields optional (except in latency threshold alert) - Add e2e tests for creating an alert - Remove `NewAlertEmptyPrompt` component and `isNewApmRuleFromStackManagement` helper - Replace `maxServiceEnvironments` and `maxServiceSelections` config options with `maxSuggestions` advanced setting. ![CleanShot 2021-09-28 at 10 35 58](https://user-images.githubusercontent.com/9912/135119948-e247615a-d235-4feb-b197-b803f165ad1e.gif) Fixes #106786 Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
In #106598 we added the ability to edit rules, but not their service name, transaction type, or environment.
Problem
This means that it is not possible to edit these values for existing alerts, and it not possible to create new APM alerts outside APM UI.
Solution
We may want to allow free-form values with suggestions (EuiCombobox) for these when creating and editing, similar to what we want to add in agent configuration with #58316.
The text was updated successfully, but these errors were encountered: