feat: gateway metrics#589
Open
vladimirvolek wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying blockfrost-platform with
|
| Latest commit: |
058623f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d5c4be1a.blockfrost-platform.pages.dev |
| Branch Preview URL: | https://gateway-metrics.blockfrost-platform.pages.dev |
Contributor
There was a problem hiding this comment.
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 /metricsroute to the gateway HTTP router. - Introduce a new
api::metricsmodule 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.
d82b46f to
f86d588
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves: #553