metrics

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

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