Skip to content

fix(logging): Reduce noise from expected InvalidSearchQuery errors in trace metrics - #122452

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/trace-metrics-logging-noise
Open

fix(logging): Reduce noise from expected InvalidSearchQuery errors in trace metrics#122452
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/trace-metrics-logging-noise

Conversation

@sentry

@sentry sentry Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The validate_trace_metrics_aggregate function in src/sentry/search/eap/trace_metrics/validator.py was using logger.exception when catching an InvalidSearchQuery exception. This led to Sentry capturing error events for expected user input validation failures (e.g., incorrect field types in aggregate functions).

This change replaces logger.exception with logger.warning. This prevents these expected, handled validation errors from creating noisy Sentry issues, while still logging the event for debugging purposes if needed.

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-5S5V

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

@sentry
sentry Bot requested a review from a team as a code owner August 24, 2026 10:39
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 24, 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