Documentation ¶
Index ¶
- Variables
- func ConfigureRoute(router *gin.Engine)
- func GetMetrics(c *gin.Context)
- func Metrics() gin.HandlerFunc
- func MonitorCount(resource, method, code string)
- func MonitorErrCount(resource, method, code string)
- func MonitorHistogram(resource, method, code string, start time.Time)
- func MonitorSummary(resource, method, code string, start time.Time)
- func NoMethodHandler() gin.HandlerFunc
- func NoRouteHandler() gin.HandlerFunc
- func Run() error
- func StartWebServer(router *gin.Engine) error
- func TunningWebServer() *gin.Engine
- type SimplebodyWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // the upstream library supports it. RequestCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "probix_apiserver_request_count", Help: "Counter of probix apiserver requests broken out for each method, resource and code.", }, []string{"method", "resource", "code"}, ) RequestErrCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "probix_apiserver_requestErrors_total", Help: "Counter of probix apiserver requests broken out for each method, resource and code.", }, []string{"method", "resource", "code"}, ) RequestLatencies = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "probix_apiserver_request_latencies_seconds", Help: "Response latency distribution in microseconds for method, resource and code.", Buckets: probixBuckets, }, []string{"method", "resource", "code"}, ) RequestLatenciesSummary = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name: "probix_apiserver_request_latencies_seconds_summary", Help: "Response latency summary in microseconds for each method, resource and code.", MaxAge: 10 * time.Minute, Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{"method", "resource", "code"}, ) )
Functions ¶
func GetMetrics ¶
func Metrics ¶
func Metrics() gin.HandlerFunc
func MonitorCount ¶
func MonitorCount(resource, method, code string)
func MonitorErrCount ¶
func MonitorErrCount(resource, method, code string)
func MonitorHistogram ¶
func MonitorSummary ¶
Types ¶
type SimplebodyWriter ¶
type SimplebodyWriter struct { gin.ResponseWriter // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.