Skip to content

Add Prometheus metrics endpoint#44

Open
Errordog2 wants to merge 1 commit into
Zcorehub:mainfrom
Errordog2:codex/prometheus-metrics-38
Open

Add Prometheus metrics endpoint#44
Errordog2 wants to merge 1 commit into
Zcorehub:mainfrom
Errordog2:codex/prometheus-metrics-38

Conversation

@Errordog2

Copy link
Copy Markdown

Summary

  • Add a Prometheus-compatible GET /metrics endpoint with optional METRICS_SECRET bearer auth.
  • Track bounded-label API request counts, accepted credit events, Horizon failures, wallet-signature verification failures, and Prisma query duration observations.
  • Add focused unit tests for metrics rendering and request middleware increments, plus Vercel scrape documentation.

Closes #38

Validation

  • npm test -- src/services/__tests__/metrics.service.test.ts src/middleware/__tests__/metrics.middleware.test.ts passed: 3 tests.
  • npm test passed: 12 files / 47 tests.
  • npm run build passed.
  • git diff --check passed for changed files.
  • Sensitive scan over changed files found no payment/account/private-key markers.

No payment details or account identifiers are included in this PR.

Cbiux added a commit that referenced this pull request Jun 19, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus /metrics endpoint for API monitoring

1 participant