github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/pkg/metrics/metrics.go (about) 1 package metrics 2 3 import ( 4 "github.com/labstack/echo/v4" 5 6 "github.com/prometheus/client_golang/prometheus/promhttp" 7 ) 8 9 // Routes set the /metrics routes. 10 // 11 // Default prometheus handler comes with two collectors: 12 // - ProcessCollector: cpu, memory and file descriptor usage as well as the 13 // process start time for the given process id under the given 14 // namespace... 15 // - GoCollector: current go process, goroutines, GC pauses, ... 16 func Routes(g *echo.Group) { 17 g.GET("", echo.WrapHandler(promhttp.Handler())) 18 }