grpcx

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClientRequestDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "grpc_client_request_duration_seconds",
			Help:    "gRPC client 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"},
	)

	ClientRequestsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "grpc_client_requests_total",
			Help: "gRPC client requests total",
		},
		[]string{"method", "code"},
	)
)

Functions

func StreamClientLoggerInterceptor

func StreamClientLoggerInterceptor(l *logger.Logger) grpc.StreamClientInterceptor

func StreamClientMetricInterceptor

func StreamClientMetricInterceptor() grpc.StreamClientInterceptor

func UnaryClientLoggerInterceptor

func UnaryClientLoggerInterceptor(l *logger.Logger) grpc.UnaryClientInterceptor

func UnaryClientMetricInterceptor

func UnaryClientMetricInterceptor() grpc.UnaryClientInterceptor

Types

type RecoveryHandlerContextFunc

type RecoveryHandlerContextFunc func(ctx context.Context, p any)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL