From 4dfb3e367efa76e3cc1737ab1ee557a9b0a01dd9 Mon Sep 17 00:00:00 2001 From: Vincent Boutour Date: Fri, 4 Jun 2021 11:51:59 +0200 Subject: [PATCH] feat(pprof): Removing registered pprof listener Signed-off-by: Vincent Boutour --- cmd/deploy/deploy.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cmd/deploy/deploy.go b/cmd/deploy/deploy.go index a7eac24..0e7e2d5 100644 --- a/cmd/deploy/deploy.go +++ b/cmd/deploy/deploy.go @@ -2,8 +2,6 @@ package main import ( "flag" - "net/http" - _ "net/http/pprof" "os" "github.com/ViBiOh/deploy/pkg/annotation" @@ -26,7 +24,6 @@ func main() { appServerConfig := server.Flags(fs, "", flags.NewOverride("WriteTimeout", "2m")) promServerConfig := server.Flags(fs, "prometheus", flags.NewOverride("Port", 9090), flags.NewOverride("IdleTimeout", "10s"), flags.NewOverride("ShutdownTimeout", "5s")) - pprofServerConfig := server.Flags(fs, "pprof", flags.NewOverride("Port", 9999)) healthConfig := health.Flags(fs, "") alcotestConfig := alcotest.Flags(fs, "") @@ -46,7 +43,6 @@ func main() { appServer := server.New(appServerConfig) promServer := server.New(promServerConfig) - pprofServer := server.New(pprofServerConfig) prometheusApp := prometheus.New(prometheusConfig) healthApp := health.New(healthConfig) @@ -59,7 +55,6 @@ func main() { go apiApp.Start(healthApp.Done()) - go pprofServer.Start("pprof", healthApp.End(), http.DefaultServeMux) go promServer.Start("prometheus", healthApp.End(), prometheusApp.Handler()) go appServer.Start("http", healthApp.End(), httputils.Handler(apiApp.Handler(), healthApp, recoverer.Middleware, prometheusApp.Middleware, owasp.New(owaspConfig).Middleware))