cli: Replace deprecated function for getting Prometheus handler (#281)

This commit is contained in:
Thomas 2019-06-13 11:34:28 +02:00 committed by Marius
parent 05d9a0ba98
commit c48512798e
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/tus/tusd/prometheuscollector"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
var MetricsOpenConnections = prometheus.NewGauge(prometheus.GaugeOpts{
@ -28,5 +29,5 @@ func SetupMetrics(handler *tusd.Handler) {
prometheus.MustRegister(prometheuscollector.New(handler.Metrics))
stdout.Printf("Using %s as the metrics path.\n", Flags.MetricsPath)
http.Handle(Flags.MetricsPath, prometheus.Handler())
http.Handle(Flags.MetricsPath, promhttp.Handler())
}