chore: do not use path in metric labels if response code is 404 not found. (#28020)

This commit is contained in:
Paweł Szczur
2025-01-29 12:20:28 +01:00
committed by GitHub
parent 1e7949a501
commit b2da7c847b

View File

@@ -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{"*"},