Skip to content

Commit

Permalink
Use the new Prometheus Handler API
Browse files Browse the repository at this point in the history
Prometheus recently changed their API with their v1.0 release. This
change updates our use of it.
  • Loading branch information
lhchavez committed Jun 23, 2019
1 parent 2c13d5e commit 9d3a380
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package gitserver
import (
base "github.com/omegaup/go-base"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"net/http"
)

Expand Down Expand Up @@ -46,5 +47,5 @@ func SetupMetrics() (base.Metrics, http.Handler) {
prometheus.MustRegister(summary)
}

return &prometheusMetrics{}, prometheus.Handler()
return &prometheusMetrics{}, promhttp.Handler()
}

0 comments on commit 9d3a380

Please sign in to comment.