From 4404b4dfb460987b17b3648e2a9472072c95cb0e Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sat, 23 May 2026 08:45:03 +0200 Subject: [PATCH] chore(stcrashreceiver): add profiler on metrics port Signed-off-by: Jakob Borg --- cmd/infra/stcrashreceiver/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/infra/stcrashreceiver/main.go b/cmd/infra/stcrashreceiver/main.go index c2e7922ca..c82d40ee9 100644 --- a/cmd/infra/stcrashreceiver/main.go +++ b/cmd/infra/stcrashreceiver/main.go @@ -20,6 +20,7 @@ import ( "io" "log" "net/http" + "net/http/pprof" "os" "path/filepath" "regexp" @@ -89,6 +90,7 @@ func main() { if params.MetricsListen != "" { mmux := http.NewServeMux() mmux.Handle("/metrics", promhttp.Handler()) + mmux.HandleFunc("/debug/pprof/", pprof.Index) go func() { if err := http.ListenAndServe(params.MetricsListen, mmux); err != nil { log.Fatalln("HTTP serve metrics:", err)