Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestCounter = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "metrics",
Name: "total_requests",
Help: "Total number of requests",
})
Functions ¶
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *responseWriter
Types ¶
type Metrics ¶
type Metrics struct { Users prometheus.Gauge CountTotalReqs prometheus.Counter UserInfo *prometheus.GaugeVec TotalRequests *prometheus.CounterVec ResponseTime *prometheus.HistogramVec ResponseSize prometheus.Histogram ResponseStatus *prometheus.CounterVec }
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer) *Metrics
Click to show internal directories.
Click to hide internal directories.