sql_exporter
sql_exporter copied to clipboard
errors in metric and target files
Hi i clone the repo and try to build this , but i go the next errors
.\metric.go:88:28: cannot use mf.config.ValueType() (type "github.com/free/sql_exporter/vendor/github.com/prometheus/client_golang/prometheus".ValueType) as type "github.com/prometheus/client_golang/prometheus".ValueType in return argument .\metric.go:234:12: undefined: "github.com/prometheus/client_golang/prometheus".LabelPairSorter .\target.go:67:12: undefined: "github.com/prometheus/client_golang/prometheus".LabelPairSorter PS C:\Users\marco esquivel\Documents\GitHub\sql_exporter>
maybe i missing something. can you help me with?
i
Have not dealt with this recently, but it may have to do with vendoring (i.e. a frozen-in-time copy of the third-party modules that SQL Exporter depends on is checked out into the vendor
directory in the root of the SQL Exporter repository).
This may help: https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
It seems to say that you should add -mod=vendor
to your command line in order for the vendored dependencies to be used.
Maybe an idea to add this to the readme somewhere? :) Im trying to build the artifacts and ran into the same thing.