From 58e9769dff9478b361a132ba610ad9a81eee6beb Mon Sep 17 00:00:00 2001 From: Jay Wren Date: Tue, 15 Aug 2023 10:58:32 -0400 Subject: [PATCH] enable pprof --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 8f821677f..6206f048c 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,8 @@ package main import ( "context" "flag" + "net/http" + "net/http/pprof" "os" "strings" @@ -138,6 +140,7 @@ func main() { setupLog.Error(err, "unable to start manager") os.Exit(1) } + mgr.AddMetricsExtraHandler("/debug/pprof/", http.HandlerFunc(pprof.Index)) if err := certv1.AddToScheme(mgr.GetScheme()); err != nil { setupLog.Error(err, "")