Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ scripts/
docs/ # Design docs and plans
observability/ # Prometheus + Grafana monitoring stack
β”œβ”€β”€ otel-collector.yml # OTel Collector: receive OTLP, export to Prometheus (local dev only)
β”œβ”€β”€ prometheus.yml # Scrape config (stackdriver-exporter + OTel Collector)
β”œβ”€β”€ prometheus.yml # Scrape config (stackdriver-exporter)
β”œβ”€β”€ alert_rules.yml # Alert rules (error rates, latency, cost anomalies)
β”œβ”€β”€ alertmanager.yml # Notification routing (Slack, PagerDuty)
β”œβ”€β”€ docker-compose.observability.yml # Observability stack (stackdriver-exporter bridges Cloud Monitoring)
Expand Down Expand Up @@ -380,17 +380,20 @@ docker compose -f docker-compose.observability.yml down

### Alert Rules

Alerts are defined in `observability/alert_rules.yml` and loaded by Prometheus:
- **HighPredictionErrorRate** β€” error rate > 5% for 5 minutes
- **NoPredictionsFlowing** β€” zero predictions for 10 minutes
- **HighPredictionLatency** β€” p95 latency > 1 second
- **FeatureFetchFailureSpike** β€” feature fetch failures > 10/5min
- **HighParseErrorRate** β€” parse error rate > 10%
- **PredictionBatchFailureSpike** β€” batch prediction failures spiking
- **DataflowWorkerCountSpike** β€” vCPU count > 2x 7-day average
- **HighPubSubBacklog** β€” undelivered messages > 10k

Alertmanager routing is configured in `observability/alertmanager.yml` (default receiver has no notification targets β€” configure Slack/PagerDuty webhooks for production).
Alerts are defined in `observability/alert_rules.yml` and loaded by Prometheus. All rules use `stackdriver_*` metrics from the stackdriver-exporter:

| Alert | Severity | Condition |
|---|---|---|
| `HighCloudRunErrorRate` | critical | Cloud Run 5xx rate > 5% for 5 min |
| `NoPredictionsFlowing` | critical | Zero `prediction_success` for 10 min |
| `HighPredictionLatency` | warning | Mean prediction latency > 1 second for 5 min |
| `FeatureFetchFailureSpike` | warning | `fetch_failure` + `fetch_retry` rate > 10/5min |
| `PredictionRetrySpike` | critical | `prediction_retry` rate > 5/5min |
| `ParseToFetchDropoff` | warning | > 10% of parsed messages not reaching fetch stage |
| `DataflowWorkerCountSpike` | warning | vCPU count > 2x 7-day average for 30 min |
| `HighPubSubBacklog` | warning | Undelivered messages > 10k for 15 min |

View alert status at http://localhost:9090/alerts (inactive/pending/firing). Alertmanager routing is configured in `observability/alertmanager.yml` (default receiver has no notification targets β€” configure Slack/PagerDuty webhooks for production).

## Development

Expand Down
Loading