Skip to content

Release: Phase 18a — Prometheus + Grafana (#61) - #78

Merged
Poojithvsc merged 3 commits into
mainfrom
dev
Jun 5, 2026
Merged

Release: Phase 18a — Prometheus + Grafana (#61)#78
Poojithvsc merged 3 commits into
mainfrom
dev

Conversation

@Poojithvsc

Copy link
Copy Markdown
Owner

Phase 18a: make the four Phase-9 business meters legible over time. No new meters, no app code beyond a registry dependency — a Prometheus scrape endpoint, Prometheus to store the series, and a provisioned Grafana dashboard.

What shipped

  • micrometer-registry-prometheus + /actuator/prometheus exposed. The four existing meters (orders_placed_total, payments_total, reservations_total, checkout_latency_seconds) are now scrapeable.
  • Prometheus (:9090) scrapes app:8080/actuator/prometheus every 15s (observability/prometheus/prometheus.yml).
  • Grafana (:3000) auto-provisions the Prometheus datasource + a committed 4-panel dashboard (orders by outcome, payments by outcome, reservations by status, checkout p95). PromQL targets the exact exported metric names, verified by the IT.
  • Both under the full compose profile (they observe the containerised app); default dev loop unchanged.
  • ADR-0018a, article stub.

Testing

PrometheusEndpointIT asserts /actuator/prometheus serves the exposition format and the four meters (needs @AutoConfigureObservability@SpringBootTest disables metrics export by default; production is on). mvn verify green (full suite). The IT also pinned the exact exported names so the dashboard PromQL isn't a guess (Micrometer 1.13 + new Prometheus client → no doubled _total).

Acceptance criteria (#61)

  • micrometer-registry-prometheus; /actuator/prometheus exposes metrics
  • compose prometheus (:9090) + grafana (:3000)
  • prometheus.yml under observability/prometheus/ scrapes app:8080/actuator/prometheus @ 15s
  • Grafana provisioning (datasource + dashboard JSON) under observability/grafana/
  • 4 panels over the existing meters (no NEW meters)
  • Grafana default admin/admin keeps first-login password-change prompt
  • mvn verify green
  • ADR-0018a written, books cited; article stub
  • Manual QA: run the walkthrough against docker compose --profile full up and confirm the 4 panels show non-zero data (manual step, like prior QA walkthroughs)

Closes #61.

🤖 Generated with Claude Code

Poojithvsc and others added 3 commits June 5, 2026 21:37
Add micrometer-registry-prometheus and expose /actuator/prometheus. No new
meters — the four existing business meters (orders_placed_total,
payments_total, reservations_total, checkout_latency_seconds) are now scrapeable
in Prometheus exposition format. PrometheusEndpointIT asserts the endpoint
serves them (with @AutoConfigureObservability, since @SpringBootTest disables
metrics export in tests by default; production export is on).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…isioned dashboard (Phase 18a)

docker-compose grows prometheus (:9090) and grafana (:3000) under the `full`
profile (they observe the containerised app). prometheus.yml scrapes
app:8080/actuator/prometheus every 15s. Grafana auto-provisions Prometheus as
its datasource and a committed 4-panel dashboard (orders by outcome, payments
by outcome, reservations by status, checkout p95) — PromQL targets the exact
exported metric names. Admin password intentionally left at the default so
Grafana keeps its first-login change prompt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…se 18a)

Records the Phase-18a decisions: scrape (pull) over push so the app stays
ignorant of monitoring; no new meters (reuse the Phase-9 four); dashboard PromQL
targets metric names verified by the IT, not guessed; provisioned datasource +
dashboard (versioned, no clicking); observability under the `full` profile;
Grafana default password kept to preserve the first-login change prompt. Cites
PragProg / APoSD / XP / PoEAA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Poojithvsc
Poojithvsc merged commit 6273168 into main Jun 5, 2026
2 checks passed
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.

Phase 18a: Observability - Prometheus + Grafana

1 participant