-
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
[SLO] Enable burn rate alert by default during creation via UI #176317
[SLO] Enable burn rate alert by default during creation via UI #176317
Conversation
- Adds useCreateRule hooks - Updates createWindow to use CreateSLOInput - Creates rule when SLO is created via UI
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
Does the flow risk that burn rate rules will be created without connectors? Should this be called out somehow? |
const ruleId = v4(); | ||
const body = JSON.stringify(rule); | ||
return http.post(`${http.basePath.prepend(BASE_ALERTING_API_PATH)}/rule/${ruleId}`, { | ||
body, | ||
}); |
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.
i don't think we should be calling another plugin public API.
We should create a route and use AlertingClient exposed on server side to create an alert.
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.
@XavierM thoughts?
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.
If it's public, it should be ok to use them. We use at least 2 other RAC apis for fetching the rules and alerts.
It sounds like this change has a small impact on the documentation here. Can you open a docs issue or--if you feel inclined--open a docs PR to make sure the docs get updated? Thanks! |
updateSlo({ sloId: slo.id, slo: processedValues }); | ||
navigate(basePath.prepend(paths.observability.slos)); | ||
} else { | ||
const processedValues = transformCreateSLOFormToCreateSLOInput(values); | ||
|
||
if (isCreateRuleCheckboxChecked) { | ||
const { id } = await createSlo({ slo: processedValues }); | ||
navigate( | ||
basePath.prepend(`${paths.observability.sloEdit(id)}?${CREATE_RULE_SEARCH_PARAM}=true`) | ||
); | ||
} else { | ||
createSlo({ slo: processedValues }); | ||
navigate(basePath.prepend(paths.observability.slos)); | ||
} | ||
const resp = await createSlo({ slo: processedValues }); | ||
await createBurnRateRule({ | ||
rule: createBurnRateRuleRequestBody({ ...processedValues, id: resp.id }), | ||
}); | ||
navigate(basePath.prepend(paths.observability.slos)); |
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.
Nice simplification
<BurnRateRuleFlyout | ||
slo={slo as GetSLOResponse} | ||
isAddRuleFlyoutOpen={isAddRuleFlyoutOpen} | ||
canChangeTrigger={false} | ||
/> |
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.
We can know add the form into a flyout without much difficulty 👏🏻
@paulb-elastic We decided via Slack to go ahead and create the rule without connectors: @grabowskit said:
|
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.
Tested locally and work as expected
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* main: (224 commits) [Http] Replace `buildNr` with `buildSha` in static asset paths (#175898) [Ops] Fix GCS bucket access for future buildkite agents (#174756) [api-docs] 2024-02-07 Daily api_docs build (#176362) skip flaky suite (#176002) skip failing es promotion suite (#176359) [Cloud Security] [Grouping] Add URL Params support to the grouping components (#175749) chore(NA): update versions after v8.12.2 bump (#176309) chore(NA): update versions after v7.17.19 bump (#176313) skip failing test suite (#176352) [SLO] Enable burn rate alert by default during creation via UI (#176317) [Fleet] Add the uptime capability to observability projects (#176285) [Security Solution][Endpoint] Fix Manifest Manger so that it works with large (>10k) (#174411) [ResponseOps] Alert creation delay based on user definition (#175851) [data views] Default field formatters based on field meta values (#174973) [Cloud Security]Detection Rules counter on Rules Flyout (#176041) [Security Solution] Data Quality Dashboard persistence (#175673) [Ent Search] Connector client copy cleanup (#176290) [ML] Anomaly Detection: Adds actions menu to anomaly markers in Single Metric Viewer chart. (#175556) [ML] Anomaly Detection: Fix `values-dots` colors (#176303) [Fleet] Logstash Output - being compliant to RFC-952 (#176298) ...
…ic#176317) ## Summary This PR changes the SLO creation behavior via the UI. Instead of having a checkbox to create the Burn Rate rule, with this PR, the Burn Rate Rule will be created by default. The Burn Rate rule is only created by default when using the UI, the create SLO API does not create a rule by default.
Thank you for the prompt @dedemorton I've raised elastic/observability-docs#3600 for this |
…ic#176317) ## Summary This PR changes the SLO creation behavior via the UI. Instead of having a checkbox to create the Burn Rate rule, with this PR, the Burn Rate Rule will be created by default. The Burn Rate rule is only created by default when using the UI, the create SLO API does not create a rule by default.
…ic#176317) ## Summary This PR changes the SLO creation behavior via the UI. Instead of having a checkbox to create the Burn Rate rule, with this PR, the Burn Rate Rule will be created by default. The Burn Rate rule is only created by default when using the UI, the create SLO API does not create a rule by default.
…ic#176317) ## Summary This PR changes the SLO creation behavior via the UI. Instead of having a checkbox to create the Burn Rate rule, with this PR, the Burn Rate Rule will be created by default. The Burn Rate rule is only created by default when using the UI, the create SLO API does not create a rule by default.
Summary
This PR changes the SLO creation behavior via the UI. Instead of having a checkbox to create the Burn Rate rule, with this PR, the Burn Rate Rule will be created by default. The Burn Rate rule is only created by default when using the UI, the create SLO API does not create a rule by default.