Merge pull request #15339 from colega/export-go-sync-mutex-wait-total-seconds-total-metric

Export 'go_sync_mutex_wait_total_seconds_total' metric
This commit is contained in:
Bryan Boreham 2024-11-20 13:34:37 +00:00 committed by GitHub
commit 3c22b35a03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,6 +27,7 @@ import (
"os"
"os/signal"
"path/filepath"
goregexp "regexp" //nolint:depguard // The Prometheus client library requires us to pass a regexp from this package.
"runtime"
"runtime/debug"
"strconv"
@ -295,6 +296,7 @@ func main() {
collectors.WithGoCollectorRuntimeMetrics(
collectors.MetricsGC,
collectors.MetricsScheduler,
collectors.GoRuntimeMetricsRule{Matcher: goregexp.MustCompile(`^/sync/mutex/wait/total:seconds$`)},
),
),
)