Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HTTPServerOps = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "bdapi", Name: "http_server_route_ops_total", Help: "Number of HTTP requests served.", }, []string{"route", "response_code", "content_type"}, ) HTTPServerResponseTime = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "bdapi", Name: "http_server_request_duration_seconds", Help: "Histogram of response time for http server handlers in seconds", Buckets: buckets, }, []string{"route"}) ClientResponseTime = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "bdapi", Name: "http_client_request_duration_seconds", Help: "Histogram of response time for http clients in seconds", Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}, }, []string{"host", "method", "status_code"}) )
Functions ¶
func ClientStatusPrinter ¶
func NewMiddleware ¶
func NewMiddleware(handler http.HandlerFunc) http.HandlerFunc
func OnHTTPRequest ¶
func OnHTTPRequest(status int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.