Skip to content

fix(logging): Downgrade hash mismatch log level to info#120317

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/grouping-info-log-level
Open

fix(logging): Downgrade hash mismatch log level to info#120317
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/grouping-info-log-level

Conversation

@sentry

@sentry sentry Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The event_grouping_info.hash_mismatch log in src/sentry/grouping/grouping_info.py was incorrectly set to logger.error.

As noted in the code comments, hash mismatches are an expected and informational state (due to on-the-fly hash regeneration potentially differing from stored hashes), not an actual error. This was causing a high volume of false error events to be reported to Sentry.

This change downgrades the log level from error to info, accurately reflecting the nature of the event. A metrics.incr call already captures this event for monitoring purposes, making the error log redundant and misleading.

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-RS9

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@sentry
sentry Bot requested a review from a team as a code owner July 22, 2026 10:41
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 1fa23b7 in this run:

tests/sentry/issues/endpoints/test_event_grouping_info.py::EventGroupingInfoEndpointTestCase::test_get_grouping_info_hash_mismatchlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/issues/endpoints/test_event_grouping_info.py:219: in test_get_grouping_info_hash_mismatch
    mock_logger.error.assert_called_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:968: in assert_called_with
    raise AssertionError(error_message)
E   AssertionError: expected call not found.
E   Expected: error('event_grouping_info.hash_mismatch', extra={'project_id': 4558526577770512, 'event_id': 'd347bb885a42410089619a72d8b63949'})
E     Actual: not called.

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