Commit Graph
2 Commits
Author SHA1 Message Date
David SantosandClaude Sonnet 4.6 8bb49ce32b feat(observability): integrate Loki for centralised log aggregation (BIT-14248)
Adds Grafana Loki + Promtail to the Docker Compose observability profile,
enabling structured-log collection from all errors.bitreport.pt services.

- deploy/loki/loki.yaml: Loki server (filesystem storage, TSDB v13, 30-day retention)
- deploy/loki/promtail.yaml: Docker SD auto-discovery, JSON parse, Pino level normalisation
- deploy/grafana/loki-logs-dashboard.json: Grafana log dashboard (uid er-loki-logs)
- docs/OBSERVABILITY_LOKI.md: setup, key LogQL queries, troubleshooting runbook
- docker-compose.yml: loki + promtail services under --profile observability; LOG_LEVEL env
- .env.example / ingest-api/.env.example: LOG_LEVEL + ER_PUBLISH_LOKI_PORT documented

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-27 08:03:20 +00:00
Peter Spark c6e4305c79 feat(observability): stats endpoint, Prometheus metrics, SLO tracking, Grafana dashboard (BIT-734)
- GET /api/error-monitoring/stats: 24h ingestion volume, severity
  distribution, per-project metrics with resolution rates, hourly trend
- Prometheus /metrics on both api (port 3200) and ingest-api (port 3041)
  with HTTP request duration histograms, ingest SLO latency (p50/p95/p99),
  event throughput counters, domain gauges
- Grafana dashboard JSON (deploy/grafana/) with SLO panels, error volume,
  severity/state distribution, per-project charts, Node.js process metrics
- SLO runbook (docs/RUNBOOK_SLO.md): alert rules, scrape config,
  triage procedures for latency, error rate, and availability breaches

Paperclip-Agent: Peter Spark (urlKey peter-spark; id 49ce66f8-6be6-4644-afd3-eb6d8d0d4b3e)
Paperclip-Issue: BIT-734
Paperclip-Run: f45bcdc4-4757-4829-8e75-b60a8f9a7be4
2026-04-02 18:26:24 +00:00