Skip to content

Commit a54621a

Browse files
ti-chi-botnolouchti-chi-bot[bot]
authored
api: fix cannot dump trace (#7255) (#7265)
close #7253 api: fix cannot dump trace with dashboard Signed-off-by: nolouch <nolouch@gmail.com> Co-authored-by: nolouch <nolouch@gmail.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
1 parent 7b3611a commit a54621a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

server/util.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package server
1717
import (
1818
"context"
1919
"net/http"
20+
"net/http/pprof"
2021
"path/filepath"
2122
"strings"
2223

@@ -121,8 +122,13 @@ func combineBuilderServerHTTPService(ctx context.Context, svr *Server, serviceBu
121122
userHandlers[pathPrefix] = handler
122123
}
123124
}
125+
124126
apiService.UseHandler(router)
125127
userHandlers[pdAPIPrefix] = apiService
128+
129+
// fix issue https://github.com/tikv/pd/issues/7253
130+
// FIXME: remove me after upgrade
131+
userHandlers["/debug/pprof/trace"] = http.HandlerFunc(pprof.Trace)
126132
return userHandlers, nil
127133
}
128134

0 commit comments

Comments
 (0)