blob: 0aa65f5578d4c2c8a540bb4c120c29a2026d9d16 (
plain)
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
|
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
// ProcessedRequests is the number of HTTP requests served
ProcessedRequests = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "gitlab_pages_http_requests_total",
Help: "Total number of HTTP requests done serving",
},
[]string{"code", "method"},
)
// SessionsActive is the number of HTTP requests currently being processed
SessionsActive = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "gitlab_pages_http_sessions_active",
Help: "The number of HTTP requests currently being processed",
})
)
func init() {
prometheus.MustRegister(ProcessedRequests)
prometheus.MustRegister(SessionsActive)
}
|