Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dto.MetricFamily is based on deprecated proto github.com/golang/protobuf/proto #381

Open
ytsssun opened this issue May 19, 2022 · 6 comments

Comments

@ytsssun
Copy link

ytsssun commented May 19, 2022

Migrate to a new dto.MetricFamily based on new google.golang.org/protobuf/proto

@beorn7
Copy link
Member

beorn7 commented May 25, 2022

I have a vague memory that I tried that already, and it turned out to be a breaking change.

Happy to stand corrected.

@timc4662
Copy link

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: matttproud/golang_protobuf_extensions@d8e45f2

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

@xor22h
Copy link

xor22h commented Oct 25, 2022

Same issue as @timc4662 today...

@rafi0101
Copy link

Me too @timc4662, thank you 😄
But I think the library shold be updated asap.

@HobbyBear
Copy link

thanks ,solve my problem

@edoger
Copy link

edoger commented Jun 5, 2023

The github.com/matttproud/golang_protobuf_extensions library is already implemented in the official library, and this issue will be resolved after deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants