Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "request_success_ops_total", Help: "Total execution", }, []string{"method"}) InternalError = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "request_error_ops_total", Help: "Total execution", }, []string{"method"}) BadRequestError = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "request_bad_ops_total", Help: "Total execution", }, []string{"method"}) ConflictRequestError = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "request_conflict_ops_total", Help: "Total execution", }, []string{"method"}) NotFoundRequestError = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "request_notfound_ops_total", Help: "Total execution", }, []string{"method"}) )
Functions ¶
func GRPCMetricsAndLogMiddleware ¶
func GRPCMetricsAndLogMiddleware(logger *zerolog.Logger) grpc.UnaryServerInterceptor
GRPCMetricsAndLogMiddleware tracks error and success prom metrics for grpc, and also logs if there is an error
func HTTPMetricsMiddleware ¶
func HTTPMetricsMiddleware(c *fiber.Ctx) error
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.