$ account zsais
This is a Go library that provides a Prometheus metrics middleware for the Gin web framework. It automatically collects and exposes standard HTTP metrics such as request count, request duration, response size, and request size via a `/metrics` endpoint. The library supports custom labels, a URL label mapping function to control cardinality, optional push gateway integration, and the ability to disable request body reading for performance. The architecture is a single package (`ginprometheus`) with a clean configuration API (`NewWithConfig`) and backward-compatible constructors. The middleware is applied to a Gin engine via `Use()` or `UseWithAuth()`. External dependencies are limited to Gin, the Prometheus client_golang library, and logrus for logging. The code is well-structured, idiomatic Go, with unit tests and CI.