-
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
[Actionable Observability] - Formate Actual value and the Expected value in Alert Details #147025
[Actionable Observability] - Formate Actual value and the Expected value in Alert Details #147025
Conversation
This reverts commit 653202a.
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
x-pack/plugins/observability/public/utils/format_alert_evaluation_value.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability/public/utils/format_alert_evaluation_value.test.ts
Outdated
Show resolved
Hide resolved
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.
Looks good already, small remark.
x-pack/plugins/observability/public/utils/get_alert_evaluation_unit_type_by_rule_type_id.ts
Outdated
Show resolved
Hide resolved
ruleTypeId: string | ||
): AlertEvaluationUnitType => { | ||
switch (ruleTypeId) { | ||
case 'apm.transaction_duration': |
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.
Just thinking out loud:
Does it make sense that the Observability plugin knows about specific details of the APM rule types? I am wondering if this logic is something that should be provided by each app or if we should handle it like this in the Observability plugin. (Especially if we will have similar scenarios for each rule type)
@fkanout @simianhacker What do you think?
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.
@maryam-saeidi, it's a good question. The goal was to make the AlertSummary sharable, and then each App will import it and then use their logic/formatter.
However, when I started implementation, I realized that
- APM (most likely other Apps) don't have formatters, AND they are importing and using Observability formatter.
- Doing the formatting at the Rule level is not ideal, as we only have three types of values that need to be formatted across all rule types.
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.
Interesting.
It makes sense that Observability shares formatter since the formatting logic can be re-used in different rule types.
The concern here is to spread the logic related to rules in multiple plugins and make the Observability plugin unnecessarily aware of details of each rule type and as a result, in case of any change or addition, to always update this plugin as well. So basically, we are affecting the separation of concern here.
Doing the formatting at the Rule level is not ideal, as we only have three types of values that need to be formatted across all rule types.
Also, can you please elaborate on why it is not ideal? What issues it might cause?
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.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @fkanout |
Summary
Closes #145409 by formatting the
Actual value
and theExpected value.