prom

package
v0.0.0-...-ae3da92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL