sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Alerts. Can't filter out errors in the "IF" block

Open zzzkasper-1995 opened this issue 1 year ago • 6 comments

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

I'm trying to set up notifications so that they only fire on fatal errors and if they happen more than N times

I know for sure they are there because I get alerts if I remove everything from the if block.

I also launched two types of alerts in parallel, with and without a filter, and alerts with the level=fatal filter do not work.

Steps:

  1. Click "Create Alert" on the Alert List screen.
  2. Screen – “Select alert”, select the notification type “Issuess”.
  3. In the WHEN block, select "Number of events in an issue is more than 1 in 30 days"
  4. Make sure the preview shows errors with level = fatal.
  5. in the iF block, select "The event's level is equal to fatal"
  6. It is expected that only errors with a fatal level will show in the preview. Actual result, preview is empty.

PS: If I remove the IF block, then I receive error notifications with a fatal level. On the error list screen, I can successfully filter out fatal errors using the filter: "level:fatal"

Envirement: self-host react-native: 0.71 @sentry/react-native: 5.19.1

2024-04-02_10 37 22 2024-04-02_10 36 13

Expected Result

The alert system sends messages with information about errors with level = fatal

Actual Result

The alert system does NOT send messages with information about errors with level=fatal

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

zzzkasper-1995 avatar Apr 04 '24 07:04 zzzkasper-1995

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Apr 04 '24 07:04 getsantry[bot]

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Apr 06 '24 02:04 getsantry[bot]

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

getsantry[bot] avatar Apr 06 '24 02:04 getsantry[bot]

Another use case: We want to have alert over issues that got degradation in one region. We want to get an alert over this issue.

So we've tried setting when: 5k users a day, if region = AU.

But the "if" condition works only over the last event, instead of filtering 5k users, which is quite an unexpected behaviour imo and less intuitive to understand. Though the biggest issue is that we can't have alerts over our regions, which would help us avoiding progressing faulty deploys to other regions.

mentaman avatar Apr 15 '24 13:04 mentaman

@mentaman i believe your ask is separate from @zzzkasper-1995 who's issue seems to be with the preview which currently doesn't support every combination of filter.

@mentaman issue alerts filters don't currently work together as a query builder, each filter is independent of each other. Metric alerts might be the closest you could get or if your region happens to be in the environment this would also apply to the 5k users in interval query. image

scttcper avatar Apr 16 '24 15:04 scttcper

Has this issue been solved? I also encountered this problem on my self-hosted sentry. Not only can I not preview it, but it actually cannot function normally when trigger alert. 4eeec280-1199-4700-832b-31ee632d7932 4e9f711f-70c8-4ace-8136-427c1d9b95fa

xiefeitong01 avatar May 07 '24 10:05 xiefeitong01