From 4be755d6ee3f6ddc21de93b9a74d8614b4d1da48 Mon Sep 17 00:00:00 2001 From: Victor Hugo Brito Fernandes Date: Fri, 16 Sep 2022 14:23:08 -0300 Subject: [PATCH] fix: re-enabling some metrics lost during a package update (#5696) Signed-off-by: Victor Fernandes Signed-off-by: Victor Fernandes --- cmd/thanos/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/thanos/main.go b/cmd/thanos/main.go index 4a83107d76..d6eafde695 100644 --- a/cmd/thanos/main.go +++ b/cmd/thanos/main.go @@ -10,6 +10,7 @@ import ( "os" "os/signal" "path/filepath" + "regexp" "runtime" "runtime/debug" "syscall" @@ -73,7 +74,9 @@ func main() { metrics := prometheus.NewRegistry() metrics.MustRegister( version.NewCollector("thanos"), - collectors.NewGoCollector(), + collectors.NewGoCollector( + collectors.WithGoCollectorRuntimeMetrics(collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")}), + ), collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}), )