Skip to content

fix(tags): Handle status tag#106056

Merged
wmak merged 2 commits intomasterfrom
wmak/fix/handle-status-tag
Jan 26, 2026
Merged

fix(tags): Handle status tag#106056
wmak merged 2 commits intomasterfrom
wmak/fix/handle-status-tag

Conversation

@wmak
Copy link
Member

@wmak wmak commented Jan 10, 2026

- The status field has unique handling in the Errors querybuilder where it
  becomes the group.status instead. But this means if a user sends an
  event with status as a tag the two get confused. This updates the tag
  endpoint so if we see `status` we assume the user doesn't want the
  group status but rather whatever status they sent us instead
@wmak wmak requested review from a team as code owners January 10, 2026 02:08
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 10, 2026
Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

👍🏻

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

# the events dataset has special handling of the column "status" that breaks when users also send
# the tag "status". So we need to be explicit its a tag in these cases
elif dataset == Dataset.Events and tag.key == "status":
tag.key = "tags[status]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Flag backend incorrectly renames status to tags syntax

Low Severity

When using the flag backend (useFlagsBackend=1), a flag named status gets incorrectly renamed to tags[status]. The statusgroup_status confusion described in the PR only affects the tag backend, not flags (which use distinct flags[...] syntax). The rename condition checks dataset == Dataset.Events and tag.key == "status" but doesn't exclude the flag backend case, causing flag keys to be mislabeled with tag syntax.

Fix in Cursor Fix in Web

@wmak wmak merged commit 37fb4be into master Jan 26, 2026
66 checks passed
@wmak wmak deleted the wmak/fix/handle-status-tag branch January 26, 2026 20:44
dashed pushed a commit that referenced this pull request Jan 26, 2026
- The status field has unique handling in the Errors querybuilder where
it becomes the group.status instead. But this means if a user sends an
event with status as a tag the two get confused. This updates the tag
endpoint so if we see `status` we assume the user doesn't want the group
status but rather whatever status they sent us instead
-
https://github.com/getsentry/sentry/blob/master/src/sentry/search/events/builder/errors.py#L110-L112
JonasBa pushed a commit that referenced this pull request Jan 27, 2026
- The status field has unique handling in the Errors querybuilder where
it becomes the group.status instead. But this means if a user sends an
event with status as a tag the two get confused. This updates the tag
endpoint so if we see `status` we assume the user doesn't want the group
status but rather whatever status they sent us instead
-
https://github.com/getsentry/sentry/blob/master/src/sentry/search/events/builder/errors.py#L110-L112
priscilawebdev pushed a commit that referenced this pull request Feb 2, 2026
- The status field has unique handling in the Errors querybuilder where
it becomes the group.status instead. But this means if a user sends an
event with status as a tag the two get confused. This updates the tag
endpoint so if we see `status` we assume the user doesn't want the group
status but rather whatever status they sent us instead
-
https://github.com/getsentry/sentry/blob/master/src/sentry/search/events/builder/errors.py#L110-L112
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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