Skip to content

“IN” filter in alerts removes spaces, tag values with spaces don’t match #92719

Closed
@dalnoki

Description

@dalnoki

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create an Issue Alert in Sentry and add a condition:The event’s tags match domain is in (comma separated)
  2. Enter a filter value containing a space (e.g. foo bar), and save the rule.
  3. Send or capture an event in Sentry with a tag domain="foo bar".
  4. Wait for the alert - the event will appear in the issues list, but the alert never triggers.

In contrast, if you change the filter to foobar (no space) and send an event tagged domain="foobar", the alert triggers as expected.

Alert rule: https://kismeow.sentry.io/alerts/rules/javascript-rea/16026550/details/
Issue: https://kismeow.sentry.io/issues/6653513404/distributions/?project=4505244102426624&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&stream_index=1

Sentry’s documentation on tags only prohibits spaces in tag keys, not values.

Code location:

values_set = set(match_value.replace(" ", "").split(","))

Expected Result

The alert rule should trigger for these events as well

Actual Result

The alert rule doesn't trigger

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions