Registry / observability / depado-ginprom

depado-ginprom

JSON →
library1.8.3gogounverified

Instrument a Gin server and expose a /metrics endpoint for Prometheus scraping with low cardinality by preserving path parameter names.

go get github.com/Depado/ginprom
INSTALL
IMPORT
SIG · DEPADO-GINPROM
D
depado-ginprom
observabilitygov1.8.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ginprom
github.com/Depado/ginprom

Set up Prometheus metrics for a Gin web server.

package main import ( "github.com/Depado/ginprom" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() p := ginprom.New(r) r.Use(p.Instrument()) r.GET("/metrics", gin.WrapH(p.Handler())) r.Run() }
Debug
Known issues
gotchaRequires Gin framework; not standalone.
fix
Ensure you have Gin imported and configured.
affects: >=1.0.0
Upgrade
Version history
1.8.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
2
Amazon
1
Resources
depado-ginprom — go get depado-ginprom · libregistry