opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

Prepare opentelemetry-prometheus for new protobuf version.

Open hdost opened this issue 1 year ago • 5 comments

Originally posted by @dependabot in https://github.com/open-telemetry/opentelemetry-rust/pull/1548

We may even want to consider changing to the official Prometheus Rust crate. It didn't exist previously when the exporter was originally implemented.

  • [ ] Consider switching to official crate.
  • [ ] Determine the scope of the differences
  • [ ] Verify the binary compatibility between the proto output
  • [ ] Check if there's any user facing changes.

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-prometheus/Cargo.toml#L26 Currently, exporter depends on the prometheus crate. This crate is not the official prometheus client.

This issue is opened to explore if we should switch to the official client library - https://crates.io/crates/prometheus-client , or maybe remove the dependency altogether.

From #1557

hdost avatar Feb 17 '24 11:02 hdost

Where/why prometheus exporter needs protobuf ?

cijothomas avatar Feb 18 '24 17:02 cijothomas

The depedency is coming from prometheus client: https://github.com/tikv/rust-prometheus/blob/master/proto/proto_model.rs. Switching to prometheus-client should get rid of it.

lalitb avatar Feb 18 '24 19:02 lalitb

I know the prometheus-client isn't currently as full featured. I can take a look.

hdost avatar Feb 19 '24 03:02 hdost

The prometheus client is not compatible with the latest protobuf version - https://github.com/tikv/rust-prometheus/blob/f49c724df0e123520554664436da68e555593af0/Cargo.toml#L30. So not sure if we can upgrade opentelemetry-prometheus with new protobuf version.

lalitb avatar Feb 19 '24 08:02 lalitb

Related : https://github.com/open-telemetry/opentelemetry-rust/issues/1557

cijothomas avatar Feb 20 '24 19:02 cijothomas