fiberprometheus icon indicating copy to clipboard operation
fiberprometheus copied to clipboard

ignore /metrics, /live and /ready path

Open kirankumar-grootan opened this issue 1 year ago • 2 comments

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 avatar Apr 23 '24 16:04 kirankumar-grootan

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

kirankumar-grootan avatar Apr 23 '24 16:04 kirankumar-grootan

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

gaby avatar Apr 28 '24 20:04 gaby

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.

kirankumar-grootan avatar Jun 24 '24 10:06 kirankumar-grootan