Skip to content

Commit

Permalink
cli: Replace deprecated function for getting Prometheus handler (tus#281
Browse files Browse the repository at this point in the history
)
  • Loading branch information
thirsch authored and Acconut committed Jun 13, 2019
1 parent 05d9a0b commit c485127
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/tusd/cli/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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())
}

0 comments on commit c485127

Please sign in to comment.