-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetrics.go
More file actions
39 lines (35 loc) · 1.33 KB
/
metrics.go
File metadata and controls
39 lines (35 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
mHttpRequestsTotal = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "gitmproxy_http_requests_total",
Help: "The total number of received requests.",
}, []string{"method"})
mCacheRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_total",
Help: "The total number of received requests.",
})
mCacheRequestsHitTotal = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_hits_total",
Help: "The total number of received requests with cache hits.",
})
mCacheRequestsMissTotal = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_miss_total",
Help: "The total number of received requests with cache miss.",
})
mCacheRequestsBytes = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_bytes",
Help: "Amount of handled data.",
})
mCacheRequestsHitBytes = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_hit_bytes",
Help: "Amount of handled data with cache hit.",
})
mCacheRequestsMissBytes = promauto.NewCounter(prometheus.CounterOpts{
Name: "gitmproxy_cache_requests_miss_bytes",
Help: "Amount of handled data with cache miss.",
})
)