Skip to content

feat(backend): add Prometheus /metrics endpoint with request duration histogram - #1

Open
mandyslovestories-sudo wants to merge 2 commits into
mainfrom
feat/prometheus-metrics-endpoint
Open

feat(backend): add Prometheus /metrics endpoint with request duration histogram#1
mandyslovestories-sudo wants to merge 2 commits into
mainfrom
feat/prometheus-metrics-endpoint

Conversation

@mandyslovestories-sudo

Copy link
Copy Markdown
Owner

Summary

Closes Dev-AdeTutu#397

Changes

  • Add httpRequestDuration Histogram (method/route/status labels) to lib/metrics.ts
  • Enable collectDefaultMetrics for GC, memory, CPU, event loop
  • Register /metrics before rate limiters and auth so scrapers are never blocked
  • Wire timing middleware to capture all latencies including 4xx/5xx
  • Clean up duplicate imports and route registrations in index.ts
  • Add GitAccountModal React component
  • Add scripts/git-push-account.ts dev utility

Definition of Done

  • prom-client in dependencies
  • /metrics returns Prometheus text format
  • HTTP duration histogram with method/route/status labels
  • Default Node.js metrics collected
  • /metrics excluded from rate limiting and auth middleware

… histogram

- Add httpRequestDuration Histogram (method/route/status labels) to lib/metrics.ts
- Enable collectDefaultMetrics for GC, memory, CPU, event loop instrumentation
- Register /metrics scrape endpoint before rate limiters and auth middleware
- Wire timing middleware to capture all request latencies including 4xx/5xx
- Clean up duplicate imports and route registrations in index.ts

Closes Dev-AdeTutu#397
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(backend): add Prometheus /metrics endpoint with request count and latency histograms

1 participant