zsais/go-gin-prometheus

requests_total metric not found

dayadev opened this issue · 0 comments

I am using go-gin-prometheus as a middleware with the default metrics and a couple of custom metrics that I registered but when I look at the metrics in my /metrics endpoint, I do not see a requests_total metric in there. Should I be implementing this like a custom metrics?

 func Use(engine *gin.Engine, port string) {
     prometheus.MustRegister(commonMetrics.ComponentProcessingTime)
     prometheus.MustRegister(commonMetrics.ComponentConsumerFailures)
     ginCol := ginprometheus.NewPrometheus("gin")
     ginCol.SetListenAddress(":" + port)
     ginCol.Use(engine)
}