Skip to content

Commit

Permalink
api: fix cannot dump trace
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Oct 25, 2023
1 parent 35b2719 commit 2a92525
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package server
import (
"context"
"net/http"
"net/http/pprof"
"path/filepath"
"strings"

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 2a92525

Please sign in to comment.