diff --git a/server/util.go b/server/util.go index 654b424465e..f88d0146a7f 100644 --- a/server/util.go +++ b/server/util.go @@ -17,6 +17,7 @@ package server import ( "context" "net/http" + "net/http/pprof" "path/filepath" "strings" @@ -121,8 +122,13 @@ func combineBuilderServerHTTPService(ctx context.Context, svr *Server, serviceBu userHandlers[pathPrefix] = handler } } + apiService.UseHandler(router) userHandlers[pdAPIPrefix] = apiService + + // fix issue https://github.com/tikv/pd/issues/7253 + // FIXME: remove me after upgrade + userHandlers["/debug/pprof/trace"] = http.HandlerFunc(pprof.Trace) return userHandlers, nil }