From 2dd752b1df1752c0b4abf18346af3f6bcdd43432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 23 Aug 2022 10:55:25 +0200 Subject: [PATCH] fix(cli): Fix /debug/pprof/heap returning 404 (#2339) See https://github.com/kopia/kopia/issues/1903#issuecomment-1127172904 --- cli/observability_flags.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/observability_flags.go b/cli/observability_flags.go index 3f0c00267..5b660f470 100644 --- a/cli/observability_flags.go +++ b/cli/observability_flags.go @@ -88,6 +88,7 @@ func (c *observabilityFlags) startMetrics(ctx context.Context) error { m.HandleFunc("/debug/pprof/profile", pprof.Profile) m.HandleFunc("/debug/pprof/symbol", pprof.Symbol) m.HandleFunc("/debug/pprof/trace", pprof.Trace) + m.HandleFunc("/debug/pprof/{cmd}", pprof.Index) // special handling for Gorilla mux, see https://stackoverflow.com/questions/30560859/cant-use-go-tool-pprof-with-an-existing-server/71032595#71032595 } log(ctx).Infof("starting prometheus metrics on %v", c.metricsListenAddr)