Skip to content

Conversation

mrduncan
Copy link
Member

We raise an exception when failing to parse a Snuba response, there is no need to also log an exception here since it otherwise results in 2 separate errors being logged for the same problem.

Fixes SENTRY-5AGR

See also SENTRY-5AGQ

We raise an exception when failing to parse a Snuba response, there is
no need to also log an exception here since it otherwise results in 2
separate errors being logged for the same problem.

Fixes SENTRY-5AGR
Copy link

sentry-io bot commented Oct 10, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/sentry/utils/snuba.py

Function Unhandled Issue
_bulk_snuba_query SnubaError: HTTPConnectionPool(host='snuba-api', port=80): Read timed out. (read timeout=30) ...
Event Count: 3

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 10, 2025
@mrduncan mrduncan marked this pull request as ready for review October 10, 2025 19:38
@mrduncan mrduncan requested review from a team as code owners October 10, 2025 19:38
@mrduncan mrduncan requested a review from a team October 10, 2025 19:38
except ValueError:
if response.status != 200:
logger.exception(
logger.warning(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Log Level Downgrade Masks Parsing Errors

Changing logger.exception() to logger.warning() for Snuba JSON parsing ValueErrors loses the original traceback and error details. This also downgrades the log level from ERROR to WARNING, potentially breaking monitoring and making these parsing failures much harder to debug.

Fix in Cursor Fix in Web

@mrduncan mrduncan enabled auto-merge (squash) October 10, 2025 19:58
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.

2 participants