Skip to content
Snippets Groups Projects
Commit aa880113 authored by ale's avatar ale
Browse files

Change names of the HTTP metrics to match other jobs

parent 9b20acad
No related branches found
No related tags found
No related merge requests found
......@@ -103,16 +103,24 @@ func instrumentHandler(h http.Handler) http.Handler {
// HTTP-related metrics.
var (
// Since we instrument the root HTTP handler, we don't really
// have a good way to set the 'handler' label based on the
// request URL - but still, we'd like to set the label to
// match what the other Prometheus jobs do. So we just set it
// to 'all'.
totalRequests = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "total_requests",
Name: "http_requests_total",
Help: "Total number of requests.",
ConstLabels: prometheus.Labels{
"handler": "all",
},
},
[]string{"code"},
[]string{"code", "method"},
)
inFlightRequests = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "inflight_requests",
Name: "http_requests_inflight",
Help: "Number of in-flight requests.",
},
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment