Skip to content
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

APM service group alert errors with leading wildcard #159079

Closed
bmorelli25 opened this issue Jun 6, 2023 · 6 comments · Fixed by #159891
Closed

APM service group alert errors with leading wildcard #159079

bmorelli25 opened this issue Jun 6, 2023 · 6 comments · Fixed by #159891
Labels
apm:unified-search Unified Search related changes for APM enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bmorelli25
Copy link
Member

Kibana version: 8.8.1-snapshot

Original install method (e.g. download page, yum, from source, etc.):
dev-oblt

Describe the bug:

I'm allowed to create a service group with a leading wildcard:
Screenshot 2023-06-05 at 6 03 02 PM

But when I click on the active alert button...
Screenshot 2023-06-05 at 6 03 28 PM

I get this error because leading wildcards aren't allowed (not sure if this is the default or not?):
Screenshot 2023-06-05 at 6 04 34 PM

Expected behavior:

This might not technically be a bug. But it's not a great user experience so I've opened this issue and y'all can decide if it's worth fixing. Thanks!

@bmorelli25 bmorelli25 added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support labels Jun 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@sorenlouv sorenlouv added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jun 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@sorenlouv sorenlouv added the apm:unified-search Unified Search related changes for APM label Jun 6, 2023
@sorenlouv
Copy link
Member

Thanks @bmorelli25. That's definitely not a great user experience!

@elastic/kibana-visualizations: WDYT we can do here? is it possible for you to handle this error, so instead of showing a scary-looking stack trace you could show a friendly message that tells the user to enable allowLeadingWildcards including a direct link to the setting.

@stratoula stratoula added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Jun 6, 2023
@stratoula
Copy link
Contributor

stratoula commented Jun 6, 2023

@sqren in Lens we get the error and display it like that so it is on the app level

image

same when the error comes from unified search kql bar

image

Here is Discover
image

I wonder if we can do the same here on the alerts level? Otherwise we need to think how this can be handled on the unified search level but this will need a design effort I assume. Also unified search is just the ui component, it doesn't do any search request so I am not sure if this is the right place 🤔

@sorenlouv
Copy link
Member

sorenlouv commented Jun 8, 2023

@elastic/actionable-observability This error is happening on /app/observability/alerts?_a=(kuery:%27service.name%20:%20*opbeans*%27,rangeFrom:now-15m,rangeTo:now,status:active). Would you be able to handle it like @stratoula proposed? Thanks!

On the APM side we may want to restrict creating groups with leading wildcard - however that won't fix the problem entirely (the setting could be enabled after creating the group) so handling this on the Observability Alerts page seems necessary.

@maryam-saeidi
Copy link
Member

@sqren Here is the improvement: #159891

maryam-saeidi added a commit that referenced this issue Jun 19, 2023
…hange (#159891)

Fixes #159079

## Summary

In the case of providing a wildcard in the search query, an error might
be generated depending on whether the related setting is enabled or not.
This PR tries to handle this error on the Alerts page for a better user
experience.

|Before|After|
|---|---|

|![image](https://github.com/elastic/kibana/assets/12370520/f38e4bc7-f900-4c73-8e6e-c1989eda57ad)|![image](https://github.com/elastic/kibana/assets/12370520/cf74577e-10ab-4543-8135-f498dcc7cabf)|
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jun 19, 2023
…hange (elastic#159891)

Fixes elastic#159079

## Summary

In the case of providing a wildcard in the search query, an error might
be generated depending on whether the related setting is enabled or not.
This PR tries to handle this error on the Alerts page for a better user
experience.

|Before|After|
|---|---|

|![image](https://github.com/elastic/kibana/assets/12370520/f38e4bc7-f900-4c73-8e6e-c1989eda57ad)|![image](https://github.com/elastic/kibana/assets/12370520/cf74577e-10ab-4543-8135-f498dcc7cabf)|

(cherry picked from commit 229e8ca)
kibanamachine added a commit that referenced this issue Jun 19, 2023
…atus change (#159891) (#159938)

# Backport

This will backport the following commits from `main` to `8.8`:
- [AO] Handle buildEsQuery error (such as leading wildcard) in status
change (#159891) (229e8ca)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2023-06-19T14:22:28Z","message":"[AO]
Handle buildEsQuery error (such as leading wildcard) in status change
(#159891)\n\nFixes #159079\r\n\r\n## Summary\r\n\r\nIn the case of
providing a wildcard in the search query, an error might\r\nbe generated
depending on whether the related setting is enabled or not.\r\nThis PR
tries to handle this error on the Alerts page for a better
user\r\nexperience.\r\n\r\n|Before|After|\r\n|---|---|\r\n\r\n|![image](https://github.com/elastic/kibana/assets/12370520/f38e4bc7-f900-4c73-8e6e-c1989eda57ad)|![image](https://github.com/elastic/kibana/assets/12370520/cf74577e-10ab-4543-8135-f498dcc7cabf)|","sha":"229e8ca808b5aca07ad7cead3b64a5d63cd9c650"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:unified-search Unified Search related changes for APM enhancement New value added to drive a business result Team:APM All issues that need APM UI Team support Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants