aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorSmsS4 <36403983+SmsS4@users.noreply.github.com>2023-08-21 11:12:39 +0330
committerGitHub <noreply@github.com>2023-08-21 00:42:39 -0700
commitf61490966f70ade813b7cb1d21a24df93fe172b2 (patch)
tree011a414b4ef14f27a344162faa4f26a6072247d5 /weed/stats/metrics.go
parent3650e5adda604dc7507ba3f0f63799c4cbfa4dfe (diff)
downloadseaweedfs-f61490966f70ade813b7cb1d21a24df93fe172b2.tar.xz
seaweedfs-f61490966f70ade813b7cb1d21a24df93fe172b2.zip
Add time to first byte metric for s3 (#4768)
* Add time to first byte metric for s3 * Change second to millisecond
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 454b35d7a..dda4d95e5 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -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) {