Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PromPanicsTotal = promauto.NewCounter( prometheus.CounterOpts{ Name: "http_panics_total", Help: "Total number of HTTP requests that triggered a panic().", }, ) PromRequestsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_requests_total", Help: "Total number of HTTP requests by status code.", }, []string{"code"}, ) PromLatencyTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_latency_total", Help: "Total number of wall-time seconds spent on handling HTTP responses by status code.", }, []string{"code"}, ) PromRecvBytesTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_recv_bytes_total", Help: "Total number of bytes received in HTTP requests by status code.", }, []string{"code"}, ) PromSendBytesTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "http_send_bytes_total", Help: "Total number of bytes sent in HTTP responses by status code.", }, []string{"code"}, ) PromLatencyHist = promauto.NewHistogram( prometheus.HistogramOpts{ Name: "http_latency_seconds_hist", Help: "Histogram of HTTP request latency.", Buckets: []float64{0.005, 0.010, 0.020, 0.050, 0.100, 0.200, 0.500, 1.000, 2.000, 5.000, 10.000}, }, ) PromRecvBytesHist = promauto.NewHistogram( prometheus.HistogramOpts{ Name: "http_recv_bytes_hist", Help: "Histogram of HTTP request size.", Buckets: prometheus.ExponentialBuckets(1024, 4.0, 6), }, ) PromSendBytesHist = promauto.NewHistogram( prometheus.HistogramOpts{ Name: "http_send_bytes_hist", Help: "Histogram of HTTP response size.", Buckets: prometheus.ExponentialBuckets(1024, 4.0, 6), }, ) )
View Source
var OnPanic func(error) = DefaultOnPanic
Functions ¶
func DefaultOnPanic ¶
func DefaultOnPanic(err error)
Types ¶
type HandlerFunc ¶
type PanicError ¶
type PanicError struct {
Value interface{}
}
func (PanicError) Error ¶
func (err PanicError) Error() string
Click to show internal directories.
Click to hide internal directories.