dto.MetricFamily is based on deprecated proto github.com/golang/protobuf/proto
Migrate to a new dto.MetricFamily based on new google.golang.org/protobuf/proto
I have a vague memory that I tried that already, and it turned out to be a breaking change.
Happy to stand corrected.
FYI: I believe this is related to the error I'm getting today after running "go get -u"
../../../go/pkg/mod/github.com/prometheus/[email protected]/expfmt/decode.go:89:38: cannot use v (variable of type *io_prometheus_client.MetricFamily) as type protoreflect.ProtoMessage in argument to pbutil.ReadDelimited: *io_prometheus_client.MetricFamily does not implement protoreflect.ProtoMessage (missing ProtoReflect method)
This appears related to this commit: https://github.com/matttproud/golang_protobuf_extensions/commit/d8e45f28e59a34ac89667fb05d8585297f784b85
golang_protobuf_extensions been updated to google.golang.org/protobuf/proto. promethus/common depends on golang_protobuf_extensions.
A workaround is to use v1.0.2 in my mod file.
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
Same issue as @timc4662 today...
Me too @timc4662, thank you 😄 But I think the library shold be updated asap.
thanks ,solve my problem
The github.com/matttproud/golang_protobuf_extensions library is already implemented in the official library, and this issue will be resolved after deprecation.