Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpRequestsDurationSeconds = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_requests_duration_seconds", Help: "Duration of HTTP requests.", }, []string{"path"}, )
View Source
var HttpRequestsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_requests_total", Help: "Number of HTTP requests.", }, []string{"path"}, )
View Source
var HttpResponseStatusCodesTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_response_status_codes_total", Help: "Number of response status codes for path", }, []string{"path", "code"}, )
Functions ¶
func PrometheusMiddleware ¶
PrometheusMiddleware adds basic metrics to all http requests
func RunMetricsServer ¶
RunMetricsServer runs http server for prometheus metrics
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.