Skip to content

feat(ops): establish comprehensive Prometheus telemetry #29

Description

@0dillon

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

  • Integrate prom-client and collect default Node.js metrics.
  • Implement a custom middleware to track HTTP response times and status codes.
  • Expose a /metrics endpoint (restricted to internal network IPs).
  • Expose a /health endpoint verifying PostgreSQL and Redis connectivity.

Tech Stack

TypeScript (Node.js 24), Express, prom-client.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions