viper-app/internal/server/ext/init_metric.go

11 lines
197 B
Go
Raw Normal View History

package ext
import (
"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func initMetric(e *gin.Engine) {
e.GET("/metrics", gin.WrapH(promhttp.Handler()))
}