Skip to content

Commit a2fd984

Browse files
committed
Fixed metrics, fixed lock key
1 parent daeefe6 commit a2fd984

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/server/prometheus_exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
Namespace: "sidecache_" + ProjectName,
2626
Name: "lock_acquiring_attempts_histogram",
2727
Help: "Lock acquiring attempts histogram",
28-
Buckets: []float64{0.999, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 100, 1000},
28+
Buckets: []float64{0.999, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 100, 200, 300, 500, 1000},
2929
})
3030

3131
totalRequestCounter = prometheus.NewCounter(

pkg/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (server CacheServer) CacheHandler(w http.ResponseWriter, r *http.Request) {
144144
}()
145145

146146
path := strings.Split(r.URL.Path, "/")
147-
key := "lock:" + path[1]
147+
key := "lock:" + path[1] + path[2]
148148
resultKey := server.HashURL(server.ReorderQueryString(r.URL))
149149

150150
if UseLock {

0 commit comments

Comments
 (0)