fix(cli): Fix /debug/pprof/heap returning 404 (#2339)

See https://github.com/kopia/kopia/issues/1903#issuecomment-1127172904
This commit is contained in:
Niklas Hambüchen authored and GitHub committed 2022-08-23 08:55:25 +00:00
1 parent dd1a6aff8d
commit 2dd752b1df
1 file changed
+1
+1
View File
@@ -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)