From b2da7c847b6c855b08659cfe60ff8ac5d466b99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szczur?= Date: Wed, 29 Jan 2025 12:20:28 +0100 Subject: [PATCH] chore: do not use path in metric labels if response code is 404 not found. (#28020) --- livestream/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livestream/main.go b/livestream/main.go index b9deb5eee1..ba6f83023a 100644 --- a/livestream/main.go +++ b/livestream/main.go @@ -94,7 +94,8 @@ func main() { e.Use(middleware.GzipWithConfig(middleware.GzipConfig{ Level: 9, // Set compression level to maximum })) - e.Use(echoprometheus.NewMiddleware("livestream")) + e.Use(echoprometheus.NewMiddlewareWithConfig( + echoprometheus.MiddlewareConfig{DoNotUseRequestPathFor404: true, Subsystem: "livestream"})) e.Use(middleware.CORSWithConfig(middleware.CORSConfig{ AllowOrigins: []string{"*"},