Closed filex closed 5 years ago
1.4.1
master
today, go build does not work anymore :(
go build
$ (master) go build # github.com/jonnenauha/prometheus_varnish_exporter ./main.go:179:33: undefined: prometheus.Handler
There is a recent change in the prometheus/client_golang repo prometheus/client_golang/pull/600 that seems to break the varnish exporter build.
prometheus/client_golang
The change in that PR suggest that the Handler now lives in promhttp:
Handler
promhttp
diff --git a/main.go b/main.go index 7c55c21..72abfd2 100644 --- a/main.go +++ b/main.go @@ -176,7 +176,7 @@ func main() { http.Handle(StartParams.Path, handler) } else { prometheus.MustRegister(PrometheusExporter) - http.Handle(StartParams.Path, prometheus.Handler()) + http.Handle(StartParams.Path, promhttp.Handler()) } if StartParams.Path != "/" {
Your fix works very well. I would appreciate the merge of the related PR!
Fixed in #46
1.4.1
andmaster
today,
go build
does not work anymore :(There is a recent change in the
prometheus/client_golang
repo prometheus/client_golang/pull/600 that seems to break the varnish exporter build.The change in that PR suggest that the
Handler
now lives inpromhttp
: