{"repo":"depado/ginprom","free":true,"listed":false,"github":"https://github.com/depado/ginprom","clone":"git clone https://github.com/depado/ginprom.git","description":"Gin Prometheus metrics exporter","language":"Go","stars":173,"topics":["metrics","middleware","instrumentation","gin","prometheus"],"license":"MIT","category":"analytics","readme_excerpt":"Ginprom Gin Prometheus metrics exporter Inspired by github.com/zsais/go-gin-prometheus - Install - Differences with go-gin-prometheus - Usage - Options - Custom counters - Custom gauges - Custom histograms - Path - Namespace - Subsystem - Engine - Prometheus Registry - HandlerNameFunc - RequestPathFunc - CustomCounterLabels - Ignore - Token - Bucket size - Native histogram - Troubleshooting - The instrumentation doesn't seem to work Install Simply run: go get -u github.com/Depado/ginprom Differences with go-gin-prometheus - No support for Prometheus' Push Gateway - Options on constructor - Adds a path label to get the matched route - Ability to ignore routes Usage Options Custom counters Add custom counters to add own values to the metrics Save p and use the following functions: - IncrementCounterValue - AddCounterValue Custom gauges Add custom gauges to add own values to the metrics Save p and use the following functions: - IncrementGaugeValue - DecrementGaugeValue - SetGaugeValue Custom histograms Add custom histograms to add own values to the metrics Save p and use the following functions: - AddCustomHistogramValue Path Override the default path ( /metrics ) on which the metrics can be accessed: Namespace Override the default namespace ( gin ): Subsystem Override the default ( gonic ) subsystem: Engine The preferred way to pass the router to ginprom: The alternative being to call the Use method after initialization: Prometheus Registry Use a custom prometheus.Registry inst","default_branch":null,"files":null,"tree":[],"storefront":"/r/depado","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/depado/ginprom/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}