Skip to content

Commit

Permalink
api: add audit log for pprof (tikv#7250)
Browse files Browse the repository at this point in the history
ref tikv#4480

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

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
CabinfeverB and ti-chi-bot[bot] authored Oct 25, 2023
1 parent 35b2719 commit 9f19361
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ func createRouter(prefix string, svr *server.Server) *mux.Router {

pprofHandler := newPprofHandler(svr, rd)
// profile API
registerFunc(apiRouter, "/debug/pprof/profile", pprof.Profile)
registerFunc(apiRouter, "/debug/pprof/trace", pprof.Trace)
registerFunc(apiRouter, "/debug/pprof/symbol", pprof.Symbol)
registerFunc(apiRouter, "/debug/pprof/heap", pprofHandler.PProfHeap)
registerFunc(apiRouter, "/debug/pprof/mutex", pprofHandler.PProfMutex)
registerFunc(apiRouter, "/debug/pprof/allocs", pprofHandler.PProfAllocs)
registerFunc(apiRouter, "/debug/pprof/block", pprofHandler.PProfBlock)
registerFunc(apiRouter, "/debug/pprof/goroutine", pprofHandler.PProfGoroutine)
registerFunc(apiRouter, "/debug/pprof/threadcreate", pprofHandler.PProfThreadcreate)
registerFunc(apiRouter, "/debug/pprof/zip", pprofHandler.PProfZip)
registerFunc(apiRouter, "/debug/pprof/profile", pprof.Profile, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/trace", pprof.Trace, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/symbol", pprof.Symbol, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/heap", pprofHandler.PProfHeap, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/mutex", pprofHandler.PProfMutex, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/allocs", pprofHandler.PProfAllocs, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/block", pprofHandler.PProfBlock, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/goroutine", pprofHandler.PProfGoroutine, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/threadcreate", pprofHandler.PProfThreadcreate, setAuditBackend(localLog))
registerFunc(apiRouter, "/debug/pprof/zip", pprofHandler.PProfZip, setAuditBackend(localLog))

// service GC safepoint API
serviceGCSafepointHandler := newServiceGCSafepointHandler(svr, rd)
Expand Down

0 comments on commit 9f19361

Please sign in to comment.