Skip to content

Commit 6a8593f

Browse files
committed
fix: fix pprof by using DefaultServeMux
replace http.NewServeMux with http.DefaultServeMux see https://pkg.go.dev/net/http/pprof > By default, all the profiles listed in runtime/pprof.Profile are available (via Handler), in addition to the Cmdline, Profile, Symbol, and Trace profiles defined in this package. If you are not using DefaultServeMux, you will have to register handlers with the mux you are using. Signed-off-by: j4ckstraw <[email protected]>
1 parent 07b7a42 commit 6a8593f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/exporters/k8sexporter/k8s_exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (ke *k8sExporter) startHTTPReporting(npdo *options.NodeProblemDetectorOptio
8181
if npdo.ServerPort <= 0 {
8282
return
8383
}
84-
mux := http.NewServeMux()
84+
mux := http.DefaultServeMux
8585

8686
// Add healthz http request handler. Always return ok now, add more health check
8787
// logic in the future.

0 commit comments

Comments
 (0)