Skip to content

fix(alerts): Log InvalidSearchQuery in EAP alerts at info level - #123098

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/alerts-eap-invalid-query-logging
Draft

fix(alerts): Log InvalidSearchQuery in EAP alerts at info level#123098
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/alerts-eap-invalid-query-logging

Conversation

@sentry

@sentry sentry Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
This PR addresses an issue where `InvalidSearchQuery` exceptions, arising from user-configured alert queries with invalid syntax, were being logged as `ERROR` level events.

Specifically, in src/sentry/incidents/utils/process_update_helpers.py, the get_eap_aggregation_value function was catching InvalidSearchQuery (e.g., when a user used list-style filtering like http.status_code:[201,200,304] on a numeric field) with a generic except Exception: block. This resulted in noisy Sentry error events (e.g., SENTRY-5TGZ).

The fix introduces an explicit except InvalidSearchQuery: handler in get_eap_aggregation_value. This handler now logs these expected user configuration errors at INFO level, aligning with the existing pattern for handling InvalidIssueSearchQuery in get_aggregation_value and preventing false-positive error alerts.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes SENTRY-5TGZ

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants