Skip to content

Alert rules: support grouped logic (AND/OR) in trigger conditions #104515

@ugniusversekenas

Description

@ugniusversekenas

Problem Statement

Problem

In Sentry alert configuration, trigger conditions currently allow choosing “any” or “all” of the listed conditions, but that choice applies to the entire list. This makes it impossible to express rules that require grouped logic, such as combining an AND pair inside an OR rule.

What we want

We want to receive an alert when any of these groups matches:

  1. Both thresholds are met (AND group):
  • Number of events in an issue is more than 100 in one day
  • Number of users affected by an issue is more than 15 in one day

OR

  1. Issue changes state from resolved → unresolved

OR

  1. Issue changes state from archived → escalating

In boolean form:
(events > 100 in 1 day AND users affected > 15 in 1 day)
OR (state: resolved → unresolved)
OR (state: archived → escalating)

Solution Brainstorm

Add condition groups such as:

  • “Add group” (each group can be AND/ALL)
  • Top-level selector to combine groups (typically OR/ANY)
Image

Product Area

Alerts

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions