This repository was archived by the owner on Oct 3, 2023. It is now read-only.
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Consider removing statsd_exporter dependency #22
Open
Description
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.