File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
pkg/exporters/k8sexporter Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import (
2020 "context"
2121 "net"
2222 "net/http"
23- _ "net/http/pprof"
23+ "net/http/pprof"
2424 "strconv"
2525
2626 "k8s.io/klog/v2"
@@ -95,6 +95,13 @@ func (ke *k8sExporter) startHTTPReporting(npdo *options.NodeProblemDetectorOptio
9595 util .ReturnHTTPJson (w , ke .conditionManager .GetConditions ())
9696 })
9797
98+ // register pprof
99+ mux .HandleFunc ("/debug/pprof/" , pprof .Index )
100+ mux .HandleFunc ("/debug/pprof/cmdline" , pprof .Cmdline )
101+ mux .HandleFunc ("/debug/pprof/profile" , pprof .Profile )
102+ mux .HandleFunc ("/debug/pprof/symbol" , pprof .Symbol )
103+ mux .HandleFunc ("/debug/pprof/trace" , pprof .Trace )
104+
98105 addr := net .JoinHostPort (npdo .ServerAddress , strconv .Itoa (npdo .ServerPort ))
99106 go func () {
100107 err := http .ListenAndServe (addr , mux )
You can’t perform that action at this time.
0 commit comments