Skip to content

Commit

Permalink
use promhttp handler (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsais authored and mcuadros committed Jul 23, 2017
1 parent 7deda23 commit 9465035
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

var defaultMetricPath = "/metrics"
Expand Down Expand Up @@ -109,7 +110,7 @@ func (p *Prometheus) handlerFunc() gin.HandlerFunc {
}

func prometheusHandler() gin.HandlerFunc {
h := prometheus.UninstrumentedHandler()
h := promhttp.Handler()
return func(c *gin.Context) {
h.ServeHTTP(c.Writer, c.Request)
}
Expand Down

0 comments on commit 9465035

Please sign in to comment.