Summary
As we scale our infrastructure to support higher transaction volumes, operating blindly without granular API metrics is unacceptable. The SRE team requires deep visibility into HTTP request durations, database query latencies, and route-specific error rates to configure our Kubernetes autoscalers accurately.
We need to integrate prom-client to automatically instrument all Express routes. This involves exposing a /metrics endpoint that will be scraped by our internal Prometheus server. Additionally, a lightweight, unauthenticated /health endpoint must be implemented for the AWS Application Load Balancer to perform rapid liveness checks against the API and its underlying database connections.
Acceptance Criteria
Tech Stack
TypeScript (Node.js 24), Express, prom-client.
Summary
As we scale our infrastructure to support higher transaction volumes, operating blindly without granular API metrics is unacceptable. The SRE team requires deep visibility into HTTP request durations, database query latencies, and route-specific error rates to configure our Kubernetes autoscalers accurately.
We need to integrate
prom-clientto automatically instrument all Express routes. This involves exposing a/metricsendpoint that will be scraped by our internal Prometheus server. Additionally, a lightweight, unauthenticated/healthendpoint must be implemented for the AWS Application Load Balancer to perform rapid liveness checks against the API and its underlying database connections.Acceptance Criteria
prom-clientand collect default Node.js metrics./metricsendpoint (restricted to internal network IPs)./healthendpoint verifying PostgreSQL and Redis connectivity.Tech Stack
TypeScript (Node.js 24), Express,
prom-client.