Skip to content

Alert Rules: additional conditions + scheduled evaluator #534

Closed

Description

@unjica

Alert Rules: additional conditions + scheduled evaluator

Parent

Depends on

Goal

Extend the Alert Rules evaluator with additional condition types and support for rules that cannot be evaluated directly during ingest.

Alert delivery must continue to flow exclusively through Notifications (fireProjectAlert and enqueue paths).

Scope

Additional condition types

Add support for additional condition kinds such as:

  • ERROR_RATE
    • error percentage over a time window
  • SESSION_DROP
    • percentage drop compared to the previous period
  • NEW_ERROR_GROUP
    • new error group detected
  • AFFECTED_USERS
    • affected user count exceeds a threshold
  • QUOTA_PERCENT
    • quota usage percentage threshold
  • NO_EVENTS
    • no events received during a time window
  • HEARTBEAT
    • no telemetry received during a time window

Condition types should remain individually extensible.

Scheduled evaluator

Introduce scheduled evaluation for conditions that are not naturally ingest-triggered.

Examples:

  • HEARTBEAT
  • NO_EVENTS
  • SESSION_DROP
  • QUOTA_PERCENT

Requirements:

  • scheduled evaluation must be idempotent
  • rules must not fire repeatedly while already within the same cooldown window
  • evaluation frequency should be configurable in one place
  • scheduled evaluation must coexist with ingest-triggered evaluation

Examples:

  • ERROR_COUNT
    • ingest triggered
  • ERROR_RATE
    • ingest or scheduled (implementation choice)
  • HEARTBEAT
    • scheduled only
  • NO_EVENTS
    • scheduled only

Unknown condition handling

Unknown or unsupported condition types must:

  • never crash rule evaluation
  • never fail an entire AND group
  • be skipped safely
  • emit diagnostic logging when appropriate

Examples:

[
    ERROR_COUNT,
    UNKNOWN_TYPE
]

↓

evaluate(ERROR_COUNT)
skip(UNKNOWN_TYPE)

If no supported conditions remain after filtering, the rule must not fire.

Delivery path

Alert Rules must continue using only:

  • fireProjectAlert()
  • Notifications enqueue paths

Alert Rules must not:

  • send Slack messages directly
  • send Discord messages directly
  • implement provider-specific delivery logic

Notifications remains the single delivery abstraction.

Acceptance criteria

  • Additional condition types are implemented
  • Scheduled evaluation exists for non-ingest conditions
  • Ingest-triggered conditions continue to work
  • Cooldown semantics are preserved
  • Unknown condition types are skip-safe
  • Unknown conditions never crash AND evaluation
  • Rules with no valid conditions never fire
  • Scheduled and ingest evaluation paths are covered by tests
  • Alert delivery continues exclusively through Notifications
  • Documentation is updated where required

Out of scope

Activity

  1. added
    enhancement
    dashboard
    api
    backend
    on Jul 17, 2026
  2. added a commit that references this issue on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apibackenddashboardenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions