From 6b20ea0c3fdbb6f5581e455da1be015daa052c3d Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Thu, 23 May 2024 08:36:00 +0530 Subject: [PATCH] chore: ignore 404 for prometheus --- cmd/server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/server.go b/cmd/server.go index 9a3b113a..6e8d2948 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -80,8 +80,9 @@ func serve(ctx context.Context, configFiles []string) { e.POST("/run/:id", scrapers.RunNowHandler) e.Use(echoprometheus.NewMiddlewareWithConfig(echoprometheus.MiddlewareConfig{ - Registerer: prom.DefaultRegisterer, - Skipper: telemetryURLSkipper, + Registerer: prom.DefaultRegisterer, + Skipper: telemetryURLSkipper, + DoNotUseRequestPathFor404: true, })) e.GET("/metrics", echoprometheus.NewHandlerWithConfig(echoprometheus.HandlerConfig{