feat(metrics): API metrics on a private listener; HA and observability design (#60) #164
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!164
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/api-metrics-60"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #60 (step 1 of docs/05-observability.md), with the HA setup (#57, #58) and observability design documents.
What
internal/metrics: Prometheus metrics for the API: requests by route pattern and status, duration histogram, in-flight, the pgx pool, Go runtime and process.KWS_METRICS_ADDR(host:port; unset = off; refused if every interface or equal to the public address). If it cannot bind, the API logs and keeps serving.httpapi.WithMiddleware;problemFallbacknow setsr.Pattern, so the route is known through the cache and the gate.docs/04-ha-setup.md,docs/05-observability.md, ADR 0036, CLAUDE.md.Checks
make lintclean.make cover: 91.4% (minimum 80%).prometheus/client_golangv1.25.0 (govulncheck clean);x/oauth2bumped 0.36.0 to 0.37.0.Not in this PR: business counters, worker job counters, monitoring Compose files, alert rules, runbook (steps 2 to 6).
🤖 Generated with Claude Code