Skip to content

Commit

Permalink
Fixed metrics, fixed lock key
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansanin committed Aug 26, 2022
1 parent daeefe6 commit 264ead4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/server/prometheus_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 264ead4

Please sign in to comment.