Skip to content

Commit

Permalink
Merge pull request #34 from squat/addpprofroutes
Browse files Browse the repository at this point in the history
main.go: add missing pprof handlers
  • Loading branch information
brancz authored Oct 21, 2019
2 parents d55fee2 + 9d31947 commit 117290c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ func main() {
router := http.NewServeMux()
router.Handle("/metrics", promhttp.InstrumentMetricHandler(reg, promhttp.HandlerFor(reg, promhttp.HandlerOpts{})))
router.HandleFunc("/debug/pprof/", pprof.Index)
router.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
router.HandleFunc("/debug/pprof/profile", pprof.Profile)
router.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
router.HandleFunc("/debug/pprof/trace", pprof.Trace)

srv := &http.Server{Addr: config.InternalAddr, Handler: router}

Expand Down

0 comments on commit 117290c

Please sign in to comment.