()
| 50 | } |
| 51 | |
| 52 | func newDebugMux() *http.ServeMux { |
| 53 | mux := http.NewServeMux() |
| 54 | mux.HandleFunc("/debug/metrics", servePrometheusMetrics) |
| 55 | mux.HandleFunc("/debug/pprof/", pprof.Index) |
| 56 | mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) |
| 57 | mux.HandleFunc("/debug/pprof/profile", pprof.Profile) |
| 58 | mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) |
| 59 | mux.HandleFunc("/debug/pprof/trace", pprof.Trace) |
| 60 | return mux |
| 61 | } |
| 62 | |
| 63 | func servePrometheusMetrics(w http.ResponseWriter, r *http.Request) { |
| 64 | w.Header().Set("Content-Type", "text/plain") |
nothing calls this directly
no test coverage detected
searching dependent graphs…