bring pprof urls in line with default

License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
This commit is contained in:
Adrian Lanzafame 2019-02-15 12:31:44 +10:00
parent b4f0eb3c95
commit c3f5a6002d
No known key found for this signature in database
GPG Key ID: 87E40C5D62EAE192

View File

@ -116,15 +116,15 @@ func setupMetrics(cfg *MetricsConfig) error {
mux.Handle("/metrics", pe)
mux.Handle("/debug/vars", expvar.Handler())
mux.HandleFunc("/debug/pprof", pprof.Index)
mux.HandleFunc("/debug/cmdline", pprof.Cmdline)
mux.HandleFunc("/debug/profile", pprof.Profile)
mux.HandleFunc("/debug/symbol", pprof.Symbol)
mux.HandleFunc("/debug/trace", pprof.Trace)
mux.Handle("/debug/block", pprof.Handler("block"))
mux.Handle("/debug/goroutine", pprof.Handler("goroutine"))
mux.Handle("/debug/heap", pprof.Handler("heap"))
mux.Handle("/debug/mutex", pprof.Handler("mutex"))
mux.Handle("/debug/threadcreate", pprof.Handler("threadcreate"))
mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
mux.Handle("/debug/pprof/block", pprof.Handler("block"))
mux.Handle("/debug/pprof/goroutine", pprof.Handler("goroutine"))
mux.Handle("/debug/pprof/heap", pprof.Handler("heap"))
mux.Handle("/debug/pprof/mutex", pprof.Handler("mutex"))
mux.Handle("/debug/pprof/threadcreate", pprof.Handler("threadcreate"))
if err := http.ListenAndServe(promAddr, mux); err != nil {
logger.Fatalf("Failed to run Prometheus /metrics endpoint: %v", err)
}