go-gin-prometheus | Gin Web Framework Prometheus metrics exporter | Analytics library
kandi X-RAY | go-gin-prometheus Summary
kandi X-RAY | go-gin-prometheus Summary
Gin Web Framework Prometheus metrics exporter
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-gin-prometheus
go-gin-prometheus Key Features
go-gin-prometheus Examples and Code Snippets
Community Discussions
Trending Discussions on go-gin-prometheus
QUESTION
In a microservice running gin-gonic, I'm trying to collect metrics in a router and expose them on a second one, but it seems this is not possible. Does anyone have experience in it?
All the documentation I found set the prometheus handler into the same application router.
Expected result
See promhttp_metric_handler_requests_total{code="200"}
increasing for each visit of the :8000/test
route
Actual result
promhttp_metric_handler_requests_total{code="200"}
increase only for each visit of the :7100/metrics
route
Example code
(following is a full application that can explain the issue)
...ANSWER
Answered 2019-Feb-14 at 11:38Prometheus uses promhttp_metric_XXXXX
for data it gathers data about itself, here:
As you can gather from http://localhost:9090/metrics, one metric that Prometheus exports about itself is called promhttp_metric_handler_requests_total (the total number of /metrics requests the Prometheus server has served).
What you are looking for is called gin_requests_total
, example of 10
requests:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-gin-prometheus
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page