From 410fcce6f0484d59184e5c5c0dd13ea454cd2f9e Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 27 Sep 2024 07:45:49 +0100 Subject: [PATCH] Remove unnecessary pprof import (#14988) The pattern of `import _ "net/http/pprof"` adds handlers to the default http handler, but Prometheus does not use that. There are explicit handlers in `web/web.go`. So, we can remove this line with no impact to behaviour. Signed-off-by: Bryan Boreham --- cmd/prometheus/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 2a96a6ba7..0e05b843d 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -22,7 +22,6 @@ import ( "math/bits" "net" "net/http" - _ "net/http/pprof" // Comment this line to disable pprof endpoint. "net/url" "os" "os/signal"