promethues

This commit is contained in:
wangchuxiao
2022-09-14 17:45:38 +08:00
parent 72d0920458
commit d534f026b0
10 changed files with 73 additions and 11 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ import (
func NewGinRouter() *gin.Engine {
gin.SetMode(gin.ReleaseMode)
baseRouter := gin.Default()
baseRouter := gin.New()
baseRouter.Use()
if config.Config.Prometheus.Enable {
baseRouter.GET("/metrics", promePkg.PrometheusHandler())
}