Skip to content

Commit

Permalink
Add http route for pprof (#4874)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanlins authored Feb 15, 2023
1 parent ea2d49f commit ec7e73f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ func main() {

func createHTTPServer() *http.Server {
serverMux := http.NewServeMux()
// HTTP path for pprof
serverMux.Handle("/", http.DefaultServeMux)
// HTTP path for prometheus.
serverMux.Handle("/metrics", promhttp.Handler())

Expand Down

0 comments on commit ec7e73f

Please sign in to comment.