opencensus-go-exporter-prometheus
opencensus-go-exporter-prometheus copied to clipboard
Consider removing statsd_exporter dependency
statsd_exporter contains a vendored copy of the prometheus client which results in a panic on startup for me:
panic: proto: duplicate enum registered: io.prometheus.client.MetricType
goroutine 1 [running]:
github.com/golang/protobuf/proto.RegisterEnum(...)
external/com_github_golang_protobuf/proto/properties.go:458
github.com/prometheus/statsd_exporter/vendor/github.com/prometheus/client_model/go.init.0()
external/com_github_prometheus_statsd_exporter/vendor/github.com/prometheus/client_model/go/metrics.pb.go:663 +0x332
The reason is that the prometheus client includes protobufs, which register their enums in a global registry on init, and so the vendored prometheus client conflicts with our separately imported one.
I can work around this, but I wanted to suggest that copy/paste might be preferred for the one function from statsd_exporter that you use (or pulling it out into a prometheus-common module), instead of importing an unrelated module with many dependencies.