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
2022-08-23 10:55:25 +02:00
committed by GitHub
parent dd1a6aff8d
commit 2dd752b1df

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)