Fix: Change TTFB metric type to histogram (#20999)

This commit is contained in:
iamsagar99
2025-04-02 11:33:58 +05:45
committed by GitHub
parent 4041a8727c
commit 8d223e07fb
2 changed files with 33 additions and 5 deletions
+5 -2
View File
@@ -319,6 +319,7 @@ type MetricDescription struct {
Name MetricName `json:"MetricName"`
Help string `json:"Help"`
Type MetricTypeV2 `json:"Type"`
Buckets []float64 `json:"Buckets,omitempty"`
}
// MetricV2 captures the details for a metric
@@ -1543,7 +1544,8 @@ func getS3TTFBDistributionMD() MetricDescription {
Subsystem: ttfbSubsystem,
Name: ttfbDistribution,
Help: "Distribution of time to first byte across API calls",
Type: gaugeMetric,
Type: histogramMetric,
Buckets: []float64{0.01, 0.05, 0.1, 0.5, 1.0, 2.0, 5.0},
}
}
@@ -1553,7 +1555,8 @@ func getBucketTTFBDistributionMD() MetricDescription {
Subsystem: ttfbSubsystem,
Name: ttfbDistribution,
Help: "Distribution of time to first byte across API calls per bucket",
Type: gaugeMetric,
Type: histogramMetric,
Buckets: []float64{0.01, 0.05, 0.1, 0.5, 1.0, 2.0, 5.0},
}
}