diff --git a/web/web.go b/web/web.go index 5fa6309ab..e3a58d5eb 100644 --- a/web/web.go +++ b/web/web.go @@ -38,7 +38,6 @@ import ( "google.golang.org/grpc" - pprof_runtime "runtime/pprof" template_text "text/template" "github.com/cockroachdb/cmux" @@ -255,8 +254,6 @@ func New(logger log.Logger, o *Options) *Handler { router.Get("/version", readyf(h.version)) router.Get("/service-discovery", readyf(h.serviceDiscovery)) - router.Get("/heap", h.dumpHeap) - router.Get("/metrics", promhttp.Handler().ServeHTTP) router.Get("/federate", readyf(httputil.CompressionHandler{ @@ -877,18 +874,6 @@ func (h *Handler) executeTemplate(w http.ResponseWriter, name string, data inter io.WriteString(w, result) } -func (h *Handler) dumpHeap(w http.ResponseWriter, r *http.Request) { - target := fmt.Sprintf("/tmp/%d.heap", time.Now().Unix()) - f, err := os.Create(target) - if err != nil { - level.Error(h.logger).Log("msg", "Could not dump heap", "err", err) - } - fmt.Fprintf(w, "Writing to %s...", target) - defer f.Close() - pprof_runtime.WriteHeapProfile(f) - fmt.Fprintf(w, "Done") -} - // AlertStatus bundles alerting rules and the mapping of alert states to row classes. type AlertStatus struct { AlertingRules []*rules.AlertingRule