From c5d91af79421aa077115b581d75455a164cedb2a Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Thu, 23 Dec 2021 11:39:10 +0800 Subject: [PATCH] Enable pprof service (#13979) Signed-off-by: zhenshan.cao --- cmd/roles/roles.go | 1 - internal/metrics/metrics.go | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/roles/roles.go b/cmd/roles/roles.go index a301db36d2..c3bcf4e5d6 100644 --- a/cmd/roles/roles.go +++ b/cmd/roles/roles.go @@ -452,7 +452,6 @@ func (mr *MilvusRoles) Run(localMsg bool, alias string) { } metrics.ServeHTTP() - sc := make(chan os.Signal, 1) signal.Notify(sc, syscall.SIGHUP, diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index b05a77c4ce..28b0f42e5f 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -19,6 +19,9 @@ package metrics import ( "net/http" + // nolint:gosec + _ "net/http/pprof" + "github.com/milvus-io/milvus/internal/log" "github.com/milvus-io/milvus/internal/util/typeutil"