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

ignore /metrics, /live and /ready path #200

Closed
kirankumar-grootan opened this issue Apr 23, 2024 · 3 comments · Fixed by #201
Closed

ignore /metrics, /live and /ready path #200

kirankumar-grootan opened this issue Apr 23, 2024 · 3 comments · Fixed by #201

Comments

@kirankumar-grootan
Copy link

is it possible to ignore /metrics, /live and /ready path from getting included in Prometheus metrics. its increasing romhttp_metric_handler_requests_total unnecessarily

promhttp_metric_handler_requests_total{code="200"} 33
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
@kirankumar-grootan
Copy link
Author

kirankumar-grootan commented Apr 23, 2024

and also is there a way to ignore other routes in future.

@gaby
Copy link
Contributor

gaby commented Apr 28, 2024

@kirankumar-grootan Just submitted a PR to add support for skipping paths natively on this middleware.

@kirankumar-grootan
Copy link
Author

Hi @gaby @ansrivas thanks for working on this and merging to master. sry for delay response. 🙏

the module seems to be not published to https://pkg.go.dev/github.com/ansrivas/fiberprometheus/v2. it doesn't have the skipPaths function to use it.

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 a pull request may close this issue.

2 participants