Fix deprecated NewBuildInfoCollector API · prometheus/client_golang@585540a (original) (raw)

Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ import (
26 26 "time"
27 27
28 28 "github.com/prometheus/client_golang/prometheus"
29 +"github.com/prometheus/client_golang/prometheus/collectors"
29 30 "github.com/prometheus/client_golang/prometheus/promhttp"
30 31 )
31 32
@@ -67,7 +68,7 @@ func main() {
67 68 prometheus.MustRegister(rpcDurations)
68 69 prometheus.MustRegister(rpcDurationsHistogram)
69 70 // Add Go module build info.
70 -prometheus.MustRegister(prometheus.NewBuildInfoCollector())
71 +prometheus.MustRegister(collectors.NewBuildInfoCollector())
71 72
72 73 start := time.Now()
73 74