metrics: adjust bucket count to reduce metrics data (#1609)

Signed-off-by: Lynn <zimu_xia@126.com>
This commit is contained in:
Lynn 2025-03-28 13:42:22 +08:00 committed by GitHub
parent 1906b778d7
commit 02eee2e236
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ func initMetrics(namespace, subsystem string, constLabels prometheus.Labels) {
Subsystem: subsystem,
Name: "request_seconds",
Help: "Bucketed histogram of sending request duration.",
Buckets: prometheus.ExponentialBuckets(0.0005, 2, 29), // 0.5ms ~ 1.5days
Buckets: prometheus.ExponentialBuckets(0.0005, 2, 24), // 0.5ms ~ 1.2h
ConstLabels: constLabels,
}, []string{LblType, LblStore, LblStaleRead, LblScope})
@ -190,7 +190,7 @@ func initMetrics(namespace, subsystem string, constLabels prometheus.Labels) {
Subsystem: subsystem,
Name: "rpc_net_latency_seconds",
Help: "Bucketed histogram of time difference between TiDB and TiKV.",
Buckets: prometheus.ExponentialBuckets(5e-5, 2, 22), // 50us ~ 105s
Buckets: prometheus.ExponentialBuckets(0.0001, 2, 20), // 0.1ms ~ 52s
ConstLabels: constLabels,
}, []string{LblStore, LblScope})