Skip to content

Commit

Permalink
api: fix cannot dump trace (#7255) (#7265)
Browse files Browse the repository at this point in the history
close #7253

api: fix cannot dump trace with dashboard

Signed-off-by: nolouch <[email protected]>

Co-authored-by: nolouch <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 26, 2023
1 parent 7b3611a commit a54621a
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 a54621a

Please sign in to comment.