Add time to first byte metric for s3 (#4768)

* Add time to first byte metric for s3

* Change second to millisecond
This commit is contained in:
SmsS4
2023-08-21 11:12:39 +03:30
committed by GitHub
parent 3650e5adda
commit f61490966f
3 changed files with 17 additions and 1 deletions

View File

@@ -226,6 +226,15 @@ var (
Help: "Bucketed histogram of s3 request processing time.",
Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24),
}, []string{"type", "bucket"})
S3TimeToFirstByteHistogram = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: Namespace,
Subsystem: "s3",
Name: "time_to_first_byte_millisecond",
Help: "Bucketed histogram of s3 time to first byte request processing time.",
Buckets: prometheus.ExponentialBuckets(0.001, 2, 27),
}, []string{"type", "bucket"})
)
func init() {
@@ -258,6 +267,7 @@ func init() {
Gather.MustRegister(S3RequestCounter)
Gather.MustRegister(S3RequestHistogram)
Gather.MustRegister(S3TimeToFirstByteHistogram)
}
func LoopPushingMetric(name, instance, addr string, intervalSeconds int) {