From 4adfb3fe2d9e8c5c2452deeb91e489a059934237 Mon Sep 17 00:00:00 2001
From: guy-har <60321938+guy-har@users.noreply.github.com>
Date: Wed, 3 Apr 2024 11:57:21 +0300
Subject: [PATCH] Align S3 Gateway Prometheus Histogram Buckets with lakeFS API
 Buckets (#7622)

---
 pkg/api/stats.go     | 2 +-
 pkg/gateway/stats.go | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pkg/api/stats.go b/pkg/api/stats.go
index e09d4f51071..3cdb36e849d 100644
--- a/pkg/api/stats.go
+++ b/pkg/api/stats.go
@@ -17,6 +17,6 @@ var requestHistograms = promauto.NewHistogramVec(
 	prometheus.HistogramOpts{
 		Name:    "api_request_duration_seconds",
 		Help:    "request durations for lakeFS API",
-		Buckets: []float64{0.01, 0.05, 0.1, 0.2, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60},
+		Buckets: []float64{0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60},
 	},
 	[]string{"operation", "code"})
diff --git a/pkg/gateway/stats.go b/pkg/gateway/stats.go
index d58ed824618..29e318ec09b 100644
--- a/pkg/gateway/stats.go
+++ b/pkg/gateway/stats.go
@@ -7,7 +7,8 @@ import (
 
 var requestHistograms = promauto.NewHistogramVec(
 	prometheus.HistogramOpts{
-		Name: "gateway_request_duration_seconds",
-		Help: "request durations for lakeFS storage gateway",
+		Name:    "gateway_request_duration_seconds",
+		Help:    "request durations for lakeFS storage gateway",
+		Buckets: []float64{0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60},
 	},
 	[]string{"operation", "code"})