Skip to content

feat: real alert delivery channels (Slack/Discord/PagerDuty/webhook) - #6

Merged
ryzrr merged 1 commit into
mainfrom
feat/alert-delivery-channels
Jul 20, 2026
Merged

feat: real alert delivery channels (Slack/Discord/PagerDuty/webhook)#6
ryzrr merged 1 commit into
mainfrom
feat/alert-delivery-channels

Conversation

@ryzrr

@ryzrr ryzrr commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Backs the Alerts "Channels" tab with real per-project destinations: new alert_channels table (migration 006), CRUD + test-delivery endpoints (/v1/channels...), and core/notify.deliver which POSTs to Slack/Discord/PagerDuty/generic webhooks.
  • Adds worker/alerts.py, an evaluation loop (every 30s) that checks each enabled alert rule against live metrics, flips firing/resolved state, writes alert_history, and delivers notifications through the configured channel.
  • Fixes anomaly detection so it only fires on metric increases — a drop in error rate or p99 latency is an improvement, not an incident, and previously could still page someone.
  • Frontend: Alerts page now manages real channels (add/edit/test/delete) instead of mock state; Alerts/Endpoints/Traces breadcrumbs show the active project's real name instead of a hardcoded placeholder; alert rules/history poll every 15s so firing state updates live.

Test plan

  • Run migration 006 and confirm alert_channels table + RLS policy are created
  • Create a Slack/Discord/webhook channel from the Alerts → Channels tab and send a test message
  • Create an alert rule pointed at that channel, breach the threshold, and confirm delivery + alert_history row
  • Confirm resolving the breach flips the rule back to ok and closes the history row
  • Verify a metric decrease (e.g. error rate dropping) no longer triggers an anomaly alert

Backs the Alerts "Channels" tab with real per-project destinations instead
of mock state: a new alert_channels table, CRUD + test-delivery endpoints,
and an evaluation worker that polls alert rules every 30s and delivers
firing/resolved notifications via core/notify.deliver.

Also fixes anomaly detection to only alert on metric increases (a drop in
error rate or p99 latency is an improvement, not an incident), and shows
the active project's real name in the Alerts/Endpoints/Traces breadcrumbs
instead of a hardcoded placeholder.
@ryzrr
ryzrr merged commit 69d28a7 into main Jul 20, 2026
4 checks passed
@ryzrr
ryzrr deleted the feat/alert-delivery-channels branch July 20, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant