-
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
Onboard "SLO burn rate" rule type with FAAD #178922
Onboard "SLO burn rate" rule type with FAAD #178922
Conversation
9a57685
to
a241edc
Compare
/ci |
# Conflicts: # x-pack/plugins/observability_solution/observability/server/lib/rules/register_rule_types.ts # x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.ts
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
LGTM; ran test suggested in PR top comment, saw documents written to
.internal.alerts-observability.slo.alerts-default-000001
as expected
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]History
To update your PR or re-run it, just comment with: cc @ersin-erdal |
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.
LGTM! Tested firing an alert and recover it + sending saving action variables in an index connector and worked as expected.
@@ -256,7 +238,8 @@ describe('BurnRateRuleExecutor', () => { | |||
getTimeRange, | |||
}); | |||
|
|||
expect(alertWithLifecycleMock).not.toBeCalled(); | |||
expect(servicesMock.alertsClient?.report).not.toBeCalled(); |
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.
Out of curiosity, what is the difference between servicesMock.alertsClient!
and servicesMock.alertsClient?
? Is there any difference in this case?
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.
No difference indeed, alertsClient!
could be used everywhere as we are sure that it exists.
fields: { | ||
actionGroup: windowDef.actionGroup, | ||
state: { | ||
alertState: AlertStates.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.
Is this instead of alert.replaceState({ alertState: AlertStates.ALERT });
? What was the reason to have replaceState
previously?
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 had different methods to set different fields in the alert such as state and context, but realised that they have never been used separately, so combined them in .report
Towards: #169867
This PR onboards "SLO burn rate" rule type with FAAD.
To verify
Create an SLO by using a test index (create a dataview for it), use very low
budget consumed %
The rule bound to the SLO should create an alert and save it under
.internal.alerts-observability.slo.alerts-default-000001