opentelemetry-rust
opentelemetry-rust copied to clipboard
Prepare opentelemetry-prometheus for new protobuf version.
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
prometheuscrate. 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
Where/why prometheus exporter needs protobuf ?
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.
I know the prometheus-client isn't currently as full featured. I can take a look.
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.
Related : https://github.com/open-telemetry/opentelemetry-rust/issues/1557