mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Export 'go_sync_mutex_wait_total_seconds_total' metric
This metric can be useful to debug mutex contention. Ref: https://github.com/golang/go/issues/49881 Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
parent
02aa6d1de6
commit
50e83e8f98
|
@ -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"
|
||||
|
@ -301,6 +302,7 @@ func main() {
|
|||
collectors.WithGoCollectorRuntimeMetrics(
|
||||
collectors.MetricsGC,
|
||||
collectors.MetricsScheduler,
|
||||
collectors.GoRuntimeMetricsRule{Matcher: goregexp.MustCompile(`^/sync/mutex/wait/total:seconds$`)},
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue