codies/metrics.go

14 lines
352 B
Go
Raw Permalink Normal View History

2020-05-25 05:18:35 +00:00
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var metricRequest = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "codies",
Subsystem: "codies",
Name: "request_total",
Help: "Total number of HTTP requests.",
}, []string{"code", "method"})