From c3f5a6002db25dc3668cd344bbeae5635c6de006 Mon Sep 17 00:00:00 2001 From: Adrian Lanzafame Date: Fri, 15 Feb 2019 12:31:44 +1000 Subject: [PATCH] bring pprof urls in line with default License: MIT Signed-off-by: Adrian Lanzafame --- observations/setup.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/observations/setup.go b/observations/setup.go index 009ea239..ac0705da 100644 --- a/observations/setup.go +++ b/observations/setup.go @@ -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) }