Difficulty: Intermediate
Type: DevOps
Background
The README documents specific Observability metrics (outbox_events_created_total, outbox_events_delivered_total, outbox_events_failed_total) but doesn't indicate they're exposed via a scrapeable endpoint.
Problem
Without a /metrics endpoint, these counters aren't consumable by standard monitoring stacks (Prometheus/Grafana), limiting operational visibility into outbox health and access-decision volume.
Expected outcome
A GET /metrics endpoint on the access-api exposes the existing outbox counters plus new counters for access decisions (access_decisions_total{decision="allowed"|"denied"}) in Prometheus text format.
Suggested implementation
- Add
prom-client to apps/access-api.
- Register existing counters (wire them into the outbox worker where they're currently just described) and add new counters for access decisions in the policy engine call path.
- Add a
/metrics route (excluded from rate limiting and versioned auth, if applicable).
- Document the endpoint and metrics list in
README.md.
Acceptance criteria
Likely affected files/directories
apps/access-api/src/workers/outboxWorker.ts
apps/access-api/src/ (new metrics route)
README.md
Difficulty: Intermediate
Type: DevOps
Background
The README documents specific Observability metrics (
outbox_events_created_total,outbox_events_delivered_total,outbox_events_failed_total) but doesn't indicate they're exposed via a scrapeable endpoint.Problem
Without a
/metricsendpoint, these counters aren't consumable by standard monitoring stacks (Prometheus/Grafana), limiting operational visibility into outbox health and access-decision volume.Expected outcome
A
GET /metricsendpoint on the access-api exposes the existing outbox counters plus new counters for access decisions (access_decisions_total{decision="allowed"|"denied"}) in Prometheus text format.Suggested implementation
prom-clienttoapps/access-api./metricsroute (excluded from rate limiting and versioned auth, if applicable).README.md.Acceptance criteria
/metricsreturns valid Prometheus-format outputLikely affected files/directories
apps/access-api/src/workers/outboxWorker.tsapps/access-api/src/(new metrics route)README.md