Skip to content

Commit

Permalink
Fix for breaking change in Prometheus Golang Client (#11)
Browse files Browse the repository at this point in the history
Version 1.0 removed the previously deprecated prometheus.handler() function. It is now provided by the promhttp package.
  • Loading branch information
marcusleg authored and mxschmitt committed Jul 7, 2019
1 parent 90fc0c5 commit b6069d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/mxschmitt/fritzbox_exporter/pkg/fritzboxmetrics"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

const serviceLoadRetryTime = 1 * time.Minute
Expand Down Expand Up @@ -382,6 +383,6 @@ func main() {
prometheus.MustRegister(collector)
prometheus.MustRegister(collectErrors)

http.Handle("/metrics", prometheus.Handler())
http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(settings.ListenAddr, nil))
}

0 comments on commit b6069d2

Please sign in to comment.