cli: Replace deprecated function for getting Prometheus handler
@@ -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())
}
