From a2fd98400a4278eb606ec92209782005beeffe22 Mon Sep 17 00:00:00 2001 From: ivansanin Date: Fri, 26 Aug 2022 16:10:34 +0400 Subject: [PATCH] Fixed metrics, fixed lock key --- pkg/server/prometheus_exporter.go | 2 +- pkg/server/server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/prometheus_exporter.go b/pkg/server/prometheus_exporter.go index b2445db..f46f13d 100644 --- a/pkg/server/prometheus_exporter.go +++ b/pkg/server/prometheus_exporter.go @@ -25,7 +25,7 @@ var ( Namespace: "sidecache_" + ProjectName, Name: "lock_acquiring_attempts_histogram", Help: "Lock acquiring attempts histogram", - Buckets: []float64{0.999, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 100, 1000}, + Buckets: []float64{0.999, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 100, 200, 300, 500, 1000}, }) totalRequestCounter = prometheus.NewCounter( diff --git a/pkg/server/server.go b/pkg/server/server.go index 752f02f..805ffbf 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -144,7 +144,7 @@ func (server CacheServer) CacheHandler(w http.ResponseWriter, r *http.Request) { }() path := strings.Split(r.URL.Path, "/") - key := "lock:" + path[1] + key := "lock:" + path[1] + path[2] resultKey := server.HashURL(server.ReorderQueryString(r.URL)) if UseLock {