Repository navigation
Closed
Labels
apiAPI service (apps/api)backendServer-side logic and jobsdashboardDashboard app (apps/dashboard)enhancementNew feature or request
Milestone
Description
Alert Rules: additional conditions + scheduled evaluator
Parent
Depends on
- Alert rules foundation: Condition[] + opaque destinationIds (#532) #531 (foundation evaluator and
conditions[]model)
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
- New delivery providers
- Slack / Discord / Teams provider logic
- AI alerting
- Release Health specific conditions
- Dashboard UX work (Alert Rules: dashboard multi-condition / edit UX #533)
Metadata
Metadata
Assignees
Labels
apiAPI service (apps/api)backendServer-side logic and jobsdashboardDashboard app (apps/dashboard)enhancementNew feature or request
Activity
Merge pull request #543 from Telemetry-Tracker/feat/alert-rules-condi…