File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 "errors"
2424 "fmt"
2525 "net/http"
26+ _ "net/http/pprof"
2627 "time"
2728
2829 "github.com/gofrs/uuid"
@@ -174,6 +175,8 @@ func main() {
174175 defer svr .Stop ()
175176
176177 mux := http .NewServeMux ()
178+ // This handles all the pprof endpoints.
179+ mux .Handle ("/debug/" , http .DefaultServeMux )
177180 // Set up healthz endpoint.
178181 healthz .RegisterDefaultChecks (mux )
179182 // Set up readyz endpoint.
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 "crypto/tls"
2424 "fmt"
2525 "net/http"
26+ _ "net/http/pprof"
2627 "os"
2728 "path/filepath"
2829 "strings"
@@ -283,6 +284,8 @@ func main() {
283284 log .WithError (err ).Fatal ("Failed to create api environment" )
284285 }
285286 mux := http .NewServeMux ()
287+ // This handles all the pprof endpoints.
288+ mux .Handle ("/debug/" , http .DefaultServeMux )
286289 healthz .RegisterDefaultChecks (mux )
287290 metrics .MustRegisterMetricsHandlerNoDefaultMetrics (mux )
288291
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import (
2424 "fmt"
2525 "net"
2626 "net/http"
27+ _ "net/http/pprof"
2728 "time"
2829
2930 "github.com/cenkalti/backoff/v4"
@@ -106,6 +107,8 @@ func main() {
106107 log .WithError (err ).Fatal ("Failed to create api environment." )
107108 }
108109 mux := http .NewServeMux ()
110+ // This handles all the pprof endpoints.
111+ mux .Handle ("/debug/" , http .DefaultServeMux )
109112 healthz .RegisterDefaultChecks (mux )
110113 metrics .MustRegisterMetricsHandlerNoDefaultMetrics (mux )
111114
You can’t perform that action at this time.
0 commit comments