Skip to content

fix(query_builder): Remove noisy "Tag value was not a string" diagnostic - #122946

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/remove-noisy-tag-value-error
Draft

fix(query_builder): Remove noisy "Tag value was not a string" diagnostic#122946
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/remove-noisy-tag-value-error

Conversation

@sentry

@sentry sentry Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

This PR removes a diagnostic sentry_sdk.capture_message that was generating excessive noise for issue SENTRY-VD5, 'Tag value was not a string'.

The issue occurred in src/sentry/search/events/builder/base.py when processing tag values that were not strings, specifically when is:unresolved in dashboard queries was parsed to status=0 (an integer). The code correctly handled this by coercing the value to a string (value = str(value)), but a diagnostic capture_message was left in place, logging an error for a perfectly valid and handled scenario.

This change removes the sentry_sdk.set_tag, sentry_sdk.set_attribute, and sentry_sdk.capture_message calls, eliminating the unnecessary error reports without affecting the query builder's functionality.

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-VD5
Fixes DAIN-1805

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

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

@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

DAIN-1805

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 0db6dbb in this run:

tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_107_OrganizationGroupSearchViews_post_approved_agent_tokenlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code
tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_106_OrganizationGroupSearchViews_post_scoped_down_agent_tokenlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code
tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_102_OrganizationGroupSearchViews_post_sessionlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code
tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_105_OrganizationGroupSearchViews_post_agent_tokenlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code
tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_103_OrganizationGroupSearchViews_post_user_tokenlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code
tests/sentry/seer/endpoints/test_organization_agent_token.py::AgentTokenPublicGetMatrixTest::test_public_mutation_104_OrganizationGroupSearchViews_post_viewer_contextlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_agent_token.py:2258: in test_matrix_cell
    self._assert_public_mutation_authentication(endpoint, authentication)
tests/sentry/seer/endpoints/test_organization_agent_token.py:2066: in _assert_public_mutation_authentication
    assert baseline.status_code < 400, (
E   AssertionError: ('OrganizationGroupSearchViewsEndpoint', 'POST', b'')
E   assert 404 < 400
E    +  where 404 = <Response status_code=404>.status_code

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