-
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
[Custom threshold] Add prefill functionality to the custom threshold rule #172783
[Custom threshold] Add prefill functionality to the custom threshold rule #172783
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
...lugins/observability/public/components/custom_threshold/custom_threshold_rule_expression.tsx
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.
The Metric Explorer provides three more aggregation types (p99, p95, and Rate) than the Custom threshold rule (here is the issue that tracks adding these Agg types #172945).
We should add the missing Aggs to the rule first, then provide the pre-fill feature. Otherwise, we will miss the goal of this PR and deliver an uncompleted feature/bug, as we don't offer or handle these Aggs yet.
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, why can't we manually test the PR?
I found that the Metric Explorer already had the option to create a Custom Threshold Rule based on defined parameters like the Metric one; we only need to enable the FF.
However, I enabled the FF, and the prefilling is not working as expected, as the screen recording shows. e.g., the groupBy is always host.name
What do you think the issue is?
Screen.Recording.2023-12-09.at.11.08.31.mov
Regarding the Feature Flag, I think as we deprecated it, it should be enabled by default/deleted; what do you think, @benakansara?
Good point. I checked the history of |
@benakansara I agree. Actually, the reason for this PR is to give the infra and logs team a chance to show and prefill this rule in their flyout when they want to, so this is a prerequisite for that effort. We can help when one of these apps uses the prefill functionality in case of an issue/missing functionality. I didn't want to put effort into implementing that logic as the app team would know better what to pass, and we could support them along the way. |
@fkanout I disagree, we are providing the base functionality that can be used with the current set of aggs. When the new aggs are added, they will be included in the prefilling out-of-the-box, and if there is a bug, we can fix it then instead of blocking this PR. I don't see the current implementation as an incomplete feature or a bug. |
@fkanout Because the related logic to pass prefill information hasn't been implemented for the custom threshold rule yet.
This is because, for now, only the |
I agree that I don't believe this is impacted by this PR though (as |
@maryam-saeidi, it's about something other than how the team will implement it or if it's out of the box. I will illustrate the issue differently: Imagine we merged the PR before adding the missing Aggs, and then the Infra team uses it to pass the prefill info, a.k.a, the user selection in the Metric Explorer, e.g., Agg type, filters, groupBy, etc... If a user selects one of the missing Aggs ( We can't map/prefill the Aggs part from the Metric Explorer as the Aggs list of the Custom threshold rule creation form and the Metric Explorer are different. How can we guarantee that the user or the Infra team will not use the missing Aggs till we implement them? And that would be more critical to handle with Serverless. I propose either :
|
@fkanout In case the Infra team wants to use this feature, they should remove passing aggs that are not supported by the Custom threshold rule, and types should warn them about using an agg that is not supported. So I don't see an issue about this topic, and the Infra team can easily filter out unsupported aggs while preparing prefill data for the Custom threshold rule. On another note, I don't think the Infra team wants to prefill this rule for the Metric Explorer page; rather, they wanted to have it for the Host view, so the issue you mentioned is less relevant there. |
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.
As discussed, the priority is to unblock the Logs' use cases.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Closes #170295
Summary
This PR adds prefill functionality to the custom threshold rule. Since we don't have any usage for it right now (it will be used in logs and infra apps), the only way to check it is by looking at tests.