Skip to main content

Grafana Local Assets

This repository includes local-first observability assets for RFC-006:

  • Dashboard JSON: infra/observability/grafana-dashboard-photobooth-api.json
  • Alert rules YAML: infra/observability/grafana-alert-rules-photobooth-api.yaml

Dashboard panels included

  1. API p95 latency (request.end -> durationMs)
  2. API 5xx error rate
  3. Payment success rate (license.activated / payment.created)

Alert rules included

  1. API 5xx spike (>2% for 5m)
  2. Payment webhook failures (>=3 events in 5m)
  3. Payment create p95 latency (>2000ms for 10m)
  4. Download route error rate (>5% for 10m)

Import steps (Grafana)

  1. Open Grafana and create/select a folder (example: Photobooth API).
  2. Import dashboard JSON from infra/observability/grafana-dashboard-photobooth-api.json.
  3. Map the datasource variable to your Loki datasource.
  4. Provision alert rules using the YAML file or copy each rule query manually in Grafana Alerting UI.

Local validation checklist

  1. Trigger /api/v1/payments/create and /api/v1/download/:photoId traffic.
  2. Confirm request.end, request.error, and domain.event logs appear in Loki.
  3. Verify each panel displays data.
  4. Test alert thresholds in a non-production environment.