Hi all,

The protobuf library used in Prometheus, gogo/protobuf 
<https://github.com/gogo/protobuf>, is no longer actively maintained 
(activity largely stopped pre-2020, looking for new ownership 
<https://github.com/gogo/protobuf/issues/691>). Along with that, many of 
the performance boosts that are provided by gogo have been addressed in the 
official Go lib, golang/protobuf <https://github.com/golang/protobuf>, as 
of v1.4.0 <https://blog.golang.org/protobuf-apiv2>.

Many projects that used gogo/protobuf have since switched to the official 
lib (ex: Istio <https://github.com/istio/istio/pull/17132>, Envoyproxy 
<https://github.com/envoyproxy/go-control-plane/issues/213>), largely for 
eco-system compatibility reasons now that performance is not a factor. The 
gogo-compiled protobufs are not compatible with any golang-compiled 
protobufs, and vice-versa. This makes consuming external protobuf APIs 
impossible unless they also maintain a gogo version, which is not common.

I'm wondering if anyone has done work in this area recently, and if the 
community agrees it's a net benefit switching to the official 
golang/protobuf implementation.

*What this would mean for Prometheus*

Looking at the history of protobuf in Prometheus, it seems like both 
golang/protobuf and gogo/protobuf were until the end of 2017, when it then 
made sense to consolidate onto gogo (#3346 
<https://github.com/prometheus/prometheus/issues/3346>) (#3394 
<https://github.com/prometheus/prometheus/pull/3394>).

As noted in the above issues, the official golang/protobuf package is still 
present in vendored files, so it is just the Prometheus protos that would 
need to be updated. The build procedures (mainly scripts/genproto.sh 
<https://github.com/prometheus/prometheus/blob/75e505babb9bbcefd8849e945814d35c7ce97e9f/scripts/genproto.sh>)
 
have not changed much since the 2017 shift, so the work would be mainly 
adjusting this back to use golang/protobuf and recompiling the `prompb` 
package. 

Does anyone know of other necessary changes/ complications that I'm missing?

Thanks all for your time,
Austin

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/38caa51d-e88a-489b-a045-54144cd1a03fn%40googlegroups.com.

Reply via email to