Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrometheusMiddleware ¶
func PrometheusMiddleware() gin.HandlerFunc
PrometheusMiddleware is a Gin middleware for tracking HTTP request metrics using Prometheus timers and counters. It records request counts and response times based on the request path and mode query parameter. Metrics include the total number of requests and the duration of HTTP responses. The middleware respects configuration settings for enabling Prometheus timers and uses predefined labels for tracking.
func PrometheusMiddlewareWithCfg ¶ added in v1.12.0
func PrometheusMiddlewareWithCfg(cfg config.File) gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.