Skip to content

feat(observability): SLOs, alerting, and on-call runbook - #448

Open
peaceshallom37-rgb wants to merge 1 commit into
AetherEdu:mainfrom
peaceshallom37-rgb:feat/issue-415-observability-slos
Open

feat(observability): SLOs, alerting, and on-call runbook#448
peaceshallom37-rgb wants to merge 1 commit into
AetherEdu:mainfrom
peaceshallom37-rgb:feat/issue-415-observability-slos

Conversation

@peaceshallom37-rgb

Copy link
Copy Markdown

Closes #415

Summary

Adds the observability layer requested in #415: SLOs for the core user
journeys, backend metrics to measure them, Grafana dashboards, burn-rate
alerting, and an on-call runbook with escalation paths.

Changes

SLOs (docs/observability/)

  • slo.md — availability and latency targets for the enrollment
    (99.5% / p95 < 2s), verification (99.9% / p95 < 1s), and playback
    (99.9% / p95 < 1s) journeys, with error budgets and measurement details.
  • alerting.md — alert semantics and the escalation contract.
  • runbook.md — incident response process, severity model, escalation
    paths, and per-alert runbooks.

Backend metrics (backend/src/metrics/slo.ts)

  • Journey-level counters (aethermint_slo_requests_total{journey,result}),
    a latency histogram for successful requests, and a last-success gauge,
    registered on the existing Prometheus registry (exposed at /api/metrics).
  • Instrumented the three journeys:
    • enrollment → eventLoggerService.logCourseEnrollment()
    • verification → eventLoggerService.verifyEvent()
    • playback → routes/content.js GET /:cid

Infra (infra/observability/)

  • prometheus/slo-alerts.yaml — recording rules (error ratios, error
    budget) plus multi-window multi-burn-rate alerts (page fast/long burn,
    ticket burn, critical error rate, journey outage, budget depleted).
  • grafana/ — dashboard ConfigMap visualising error budgets, SLO
    compliance, latency, and traffic per journey.
  • alertmanager/ — routes page alerts to the on-call rotation webhook
    and ticket alerts to the team channel, with email fallback; credentials
    are injected via environment variables, none are committed.
  • README.md — deployment steps and receiver configuration.

Notes

  • Verification failures now surface as HTTP 500 instead of being silently
    reported as "not authentic", so backend errors are no longer
    indistinguishable from a genuinely invalid credential.
  • 4xx responses are excluded from SLO denominators (client errors are not
    service failures).
  • Backend typecheck and lint pass on the changed files. The pre-existing
    tests/routes/events.test.js suite failure (undefined evaluateForUser
    in routes/admin/featureFlags.ts) is unrelated and reproduces on main.

Define SLOs for the enrollment, verification, and playback journeys,
extend the backend Prometheus metrics with journey-level counters and
latency histograms, and ship Grafana dashboards, burn-rate alert rules,
and an Alertmanager config wired to the on-call rotation.

- backend: add src/metrics/slo.ts and instrument the three journeys
- infra: PrometheusRule (recording + burn-rate alerts), Grafana dashboard
  ConfigMap, Alertmanager routes/receivers with on-call webhook
- docs: SLO definitions, alerting guide, and on-call runbook

Closes AetherEdu#415
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.

[Infrastructure] Observability: SLOs, alerting, and on-call runbook

1 participant