Documentation ¶
Index ¶
Constants ¶
View Source
const (
MethodLabel = "method"
)
Variables ¶
View Source
var ( RequestsInFlight = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "claudie_grpc_request_in_flight", Help: "Number of grpc requests currently handled", }, ) RequestCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "claudie_grpc_request_count", Help: "Total number of gRPC API calls.", }, []string{MethodLabel}, ) Latency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "claudie_grpc_call_latency_seconds", Help: "Latency of gRPC API calls in seconds.", Buckets: []float64{ .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 30, 60, 300, 600, 1200, 1800, 2700, 3600, }, }, []string{MethodLabel}, ) ErrorCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "grpc_error_count", Help: "Total number of gRPC API call errors.", }, []string{MethodLabel}, ) )
Functions ¶
func MetricsMiddleware ¶
func MetricsMiddleware(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func MustRegisterCounters ¶
func MustRegisterCounters()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.