Documentation
¶
Index ¶
- Variables
- func StreamServerLoggerInterceptor(l *logger.Logger, skipMethods ...string) grpc.StreamServerInterceptor
- func StreamServerMetricInterceptor(skipMethods ...string) grpc.StreamServerInterceptor
- func StreamServerMetricInterceptorWithMetrics(metrics *Metrics, skipMethods ...string) grpc.StreamServerInterceptor
- func StreamServerRecoveryInterceptor(h RecoveryHandlerContextFunc) grpc.StreamServerInterceptor
- func UnaryServerLoggerInterceptor(l *logger.Logger, skipMethods ...string) grpc.UnaryServerInterceptor
- func UnaryServerMetricInterceptor(skipMethods ...string) grpc.UnaryServerInterceptor
- func UnaryServerMetricInterceptorWithMetrics(metrics *Metrics, skipMethods ...string) grpc.UnaryServerInterceptor
- func UnaryServerRecoveryInterceptor(h RecoveryHandlerContextFunc) grpc.UnaryServerInterceptor
- type Metrics
- type RecoveryHandlerContextFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServerRequestDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "grpc_server_request_duration_seconds", Help: "gRPC server request duration in seconds", Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10}, }, []string{"method", "code"}, ) ServerRequestsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "grpc_server_requests_total", Help: "gRPC server requests total", }, []string{"method", "code"}, ) ServerInFlight = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "grpc_server_requests_in_flight", Help: "gRPC server requests currently processing", }, []string{"method"}, ) )
Functions ¶
func StreamServerLoggerInterceptor ¶
func StreamServerLoggerInterceptor(l *logger.Logger, skipMethods ...string) grpc.StreamServerInterceptor
func StreamServerMetricInterceptor ¶
func StreamServerMetricInterceptor(skipMethods ...string) grpc.StreamServerInterceptor
func StreamServerMetricInterceptorWithMetrics ¶ added in v1.2.2
func StreamServerMetricInterceptorWithMetrics(metrics *Metrics, skipMethods ...string) grpc.StreamServerInterceptor
func StreamServerRecoveryInterceptor ¶
func StreamServerRecoveryInterceptor(h RecoveryHandlerContextFunc) grpc.StreamServerInterceptor
func UnaryServerLoggerInterceptor ¶
func UnaryServerLoggerInterceptor(l *logger.Logger, skipMethods ...string) grpc.UnaryServerInterceptor
func UnaryServerMetricInterceptor ¶
func UnaryServerMetricInterceptor(skipMethods ...string) grpc.UnaryServerInterceptor
func UnaryServerMetricInterceptorWithMetrics ¶ added in v1.2.2
func UnaryServerMetricInterceptorWithMetrics(metrics *Metrics, skipMethods ...string) grpc.UnaryServerInterceptor
func UnaryServerRecoveryInterceptor ¶
func UnaryServerRecoveryInterceptor(h RecoveryHandlerContextFunc) grpc.UnaryServerInterceptor
Types ¶
type Metrics ¶ added in v1.2.2
type Metrics struct {
RequestDuration *prometheus.HistogramVec
RequestsTotal *prometheus.CounterVec
InFlight *prometheus.GaugeVec
}
func DefaultMetrics ¶ added in v1.2.2
func DefaultMetrics() *Metrics
func NewMetrics ¶ added in v1.2.2
func NewMetrics(registerer prometheus.Registerer) *Metrics
Click to show internal directories.
Click to hide internal directories.