getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
37.53k stars 4.04k forks source link

Fix metric alert event filter query error message #65723

Open johnrudell opened 4 months ago

johnrudell commented 4 months ago

Problem Statement

When I create an alert, I can add filters for the event, but the field "team" is not supported. You can add your team to the "Establish ownership" step, but this only provides permissions for the specified team to edit this alert.

Solution Brainstorm

It would be great if we could create alerts and filter the events by team.

Product Area

Alerts

getsantry[bot] commented 4 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 4 months ago

Routing to @getsentry/product-owners-alerts for triage ⏲️

KobbyBawuah commented 4 months ago

To add further context, the filter currently seems to work as expected. It seems the issue is that the warning shown for custom tags is misplaced: image

johnrudell commented 4 months ago

@KobbyBawuah I believe this is correct. There are issues under "Related Issues" for my alert with the team filter. It seems like is is the only supported filter key, but in reality this can be expanded to include other filters.

Dhrumil-Sentry commented 4 months ago

@johnrudell have you considered using auto assignment which allows you to use the following filter: image

johnrudell commented 4 months ago

@Dhrumil-Sentry Unfortunately, this if statement isn't available for the Number of Errors alert

Dhrumil-Sentry commented 4 months ago

@johnrudell this is a valid request and we've added this to our backlog

ceorourke commented 4 months ago

@johnrudell If I understand correctly, the request is to support the assigned:[#team-a, #team-b] search filter for metric alerts? Let's say it's the number of errors one, it'd only fire when the number of errors across issues in the target project that are assigned to your team(s) has reached the defined threshold?

johnrudell commented 3 months ago

@ceorourke Correct. Although I believe the filter is working based on my alert working. The UI just says it's not supported.

ceorourke commented 3 months ago

Thanks for the clarification!

ceorourke commented 3 months ago

Related issues: https://github.com/getsentry/sentry/issues/66480 and https://github.com/getsentry/sentry/issues/66480

jangjodi commented 2 months ago

I do not believe that the assigned filter is supported in metric alerts currently. I attempted to reproduce this and found that this alert was triggered, whereas this team alert was not when I purposely spammed this error that was assigned to the team.