Skip to content

feat: gateway metrics#589

Open
vladimirvolek wants to merge 3 commits into
mainfrom
gateway-metrics
Open

feat: gateway metrics#589
vladimirvolek wants to merge 3 commits into
mainfrom
gateway-metrics

Conversation

@vladimirvolek

@vladimirvolek vladimirvolek commented Jun 17, 2026

Copy link
Copy Markdown
Member

resolves: #553

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blockfrost-platform-docs Ready Ready Preview, Comment Jun 24, 2026 9:53pm
blockfrost-platform-docs-next Ready Ready Preview, Comment Jun 24, 2026 9:53pm

Request Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploying blockfrost-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 058623f
Status: ✅  Deploy successful!
Preview URL: https://d5c4be1a.blockfrost-platform.pages.dev
Branch Preview URL: https://gateway-metrics.blockfrost-platform.pages.dev

View logs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Prometheus-compatible GET /metrics endpoint to the gateway so operators can scrape relay connection and traffic stats in standard metrics format (Issue #553), complementing the existing JSON GET /stats.

Changes:

  • Add GET /metrics route to the gateway HTTP router.
  • Introduce a new api::metrics module that renders relay stats as Prometheus text exposition format.
  • Add unit tests validating output formatting and label escaping.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/gateway/src/main.rs Registers the new /metrics HTTP route.
crates/gateway/src/api/mod.rs Exposes the new metrics API module.
crates/gateway/src/api/metrics.rs Implements Prometheus text rendering for relay metrics + tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/gateway/src/api/metrics.rs
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.

Gateway: add GET /metrics (Prometheus format)

2 participants