tidb metrics 源码
tidb metrics 代码
文件路径:/br/pkg/backup/metrics.go
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
package backup
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
backupRegionCounters = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "br",
Subsystem: "raw",
Name: "backup_region",
Help: "Backup region statistic.",
}, []string{"type"})
backupRegionHistogram = prometheus.NewHistogram(
prometheus.HistogramOpts{
Namespace: "br",
Subsystem: "raw",
Name: "backup_region_seconds",
Help: "Backup region latency distributions.",
Buckets: prometheus.ExponentialBuckets(0.05, 2, 16),
})
)
func init() { // nolint:gochecknoinits
prometheus.MustRegister(backupRegionCounters)
prometheus.MustRegister(backupRegionHistogram)
}
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦