open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.87k stars 437 forks source link

Prepare opentelemetry-prometheus for new protobuf version. #1551

Open hdost opened 8 months ago

hdost commented 8 months ago

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.

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

cijothomas commented 8 months ago

Where/why prometheus exporter needs protobuf ?

lalitb commented 8 months ago

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.

hdost commented 8 months ago

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

lalitb commented 8 months ago

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.

cijothomas commented 8 months ago

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