Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HTTPRequestsDurationMilliseconds = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_request_duration_milliseconds", Help: "How many HTTP requests processed, partitioned by endpoint, HTTP method and status code", Buckets: []float64{1, 3, 5, 10, 25, 50, 100, 200, 500, 750, 1000, 1500, 2000, 3000, 5000, 8000}, }, []string{"endpoint", "method", "status"}, )
HTTPRequestsDurationMilliseconds is a metrics for counting HTTP Requests processing duration.
View Source
var HTTPRequestsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "http_requests_total", Help: "How many HTTP requests processed, partitioned by endpoint, HTTP method and status code", }, []string{"endpoint", "method", "status"}, )
HTTPRequestsTotal is a metrics for counting total HTTP Requests processed.
Functions ¶
func NewService ¶
func NewService() *restful.WebService
NewService return definition of the metrics service.
Types ¶
type MetricsREST ¶
type MetricsREST struct {
// contains filtered or unexported fields
}
MetricsREST is an implementation of Metrics REST endpoint.
func NewMetricsREST ¶
func NewMetricsREST() *MetricsREST
NewMetricsREST creates new REST endpoint for prometheus metrics
func (MetricsREST) GetMetrics ¶
func (c MetricsREST) GetMetrics(request *restful.Request, response *restful.Response)
GetMetrics returns metrics.
Click to show internal directories.
Click to hide internal directories.