Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Inject metrics registry in route controllers #1477

Merged
merged 13 commits into from
Aug 19, 2024

Conversation

filvecchiato
Copy link
Contributor

This PR allows for route-specific metrics to be emitted from the controllers, by injecting in the Response object (in locals) the metrics registry, making it available for each request received in case the prometheus flag is true

@filvecchiato filvecchiato changed the title Inject metrics registry in route based controllers Feat: Inject metrics registry in route based controllers Aug 15, 2024
@filvecchiato filvecchiato changed the title Feat: Inject metrics registry in route based controllers feat: Inject metrics registry in route controllers Aug 15, 2024
@filvecchiato filvecchiato marked this pull request as ready for review August 15, 2024 14:57
@filvecchiato filvecchiato requested a review from a team as a code owner August 15, 2024 14:57
Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

Overall, really great job. Just some nits for the types.

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

Great job, LGTM 🚀

Copy link
Contributor

@Imod7 Imod7 left a comment

Choose a reason for hiding this comment

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

LGTM! Just two small comments.

src/controllers/blocks/BlocksController.ts Outdated Show resolved Hide resolved
src/controllers/blocks/BlocksController.ts Outdated Show resolved Hide resolved
@filvecchiato filvecchiato merged commit 11c0173 into master Aug 19, 2024
15 checks passed
@filvecchiato filvecchiato deleted the metrics_route_based branch August 19, 2024 11:46
This pull request was closed.
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.

Expand prometheus metrics coverage to include custom route-based metrics
3 participants