[Metrics UI] Metrics threshold stores malformed KQL as an empty filter #119416
Labels
bug
Fixes for quality problems that affect the customer experience
Team: Actionable Observability - DEPRECATED
For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge"
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
v7.16.0
v8.0.0
v8.1.0
Summary
In the Metrics Threshold rule type, a user can add a KQL string filter to narrow down the results of a query for the rule to evaluate. It looks like this:
If you take this same exact filter seen here and apply it in the Discover KQL bar and push "Enter", you'll see the following error:
Unfortunately, the KQL bar in the rule type create/edit dialogue doesn't catch this particular validation error. More importantly, when we attempt to parse the filter, we swallow any errors we encounter. This means that a malformed KQL string can be saved in the saved object's
filterQuery
field as''
, even when that saved object'sfilterQueryText
field (the raw string entered and shown in the create/edit UI) is not empty.Since this filter is very important for a rule to work as intended, we need to be sure we validate this on the client side and stop swallowing errors we encounter while parsing the value.
Acceptance Criteria
Note: we should check our other rule types to see if this problem exists elsewhere, as well.
The text was updated successfully, but these errors were encountered: