diff --git a/Cargo.toml b/Cargo.toml index ba5abd5264..d3ee796bd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,17 +32,18 @@ hyper-util = "0.1" log = "0.4.21" once_cell = "1.13" pin-project-lite = "0.2" -prost = "0.13" -prost-build = "0.13" -prost-types = "0.13" +prost = "0.14" +prost-build = "0.14" +prost-types = "0.14" rand = { version = "0.9", default-features = false } reqwest = { version = "0.12", default-features = false } serde = { version = "1.0", default-features = false } serde_json = "1.0" temp-env = "0.3.6" thiserror = { version = "2", default-features = false } -tonic = { version = "0.13", default-features = false } -tonic-build = "0.13" +tonic = { version = "0.14.1", default-features = false } +tonic-prost-build = "0.14.1" +tonic-prost = "0.14.1" tokio = { version = "1", default-features = false } tokio-stream = "0.1" # Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros, diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index 6e7c27c1e5..0622ddace7 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -23,12 +23,14 @@ opentelemetry_sdk = { workspace = true, features = ["rt-tokio"] } opentelemetry-stdout = { workspace = true, features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, features = ["server", "codegen", "channel", "prost", "router"] } +tonic = { workspace = true, features = ["server", "codegen", "channel", "router"] } +tonic-prost = { workspace = true } [build-dependencies] -tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } [package.metadata.cargo-machete] ignored = [ - "prost" # needed for `tonic-build` + "prost", # needed for `tonic-prost-build` + "tonic-prost" # needed for `tonic-prost-build` ] diff --git a/examples/tracing-grpc/build.rs b/examples/tracing-grpc/build.rs index 7c661fe65b..3100f02186 100644 --- a/examples/tracing-grpc/build.rs +++ b/examples/tracing-grpc/build.rs @@ -1,4 +1,4 @@ fn main() -> Result<(), Box> { - tonic_build::compile_protos("proto/helloworld.proto")?; + tonic_prost_build::compile_protos("proto/helloworld.proto")?; Ok(()) } diff --git a/opentelemetry-proto/CHANGELOG.md b/opentelemetry-proto/CHANGELOG.md index c25374e08c..07a4dda4b3 100644 --- a/opentelemetry-proto/CHANGELOG.md +++ b/opentelemetry-proto/CHANGELOG.md @@ -5,6 +5,8 @@ - Update proto definitions to v1.7.0. - Added Rust generated protos for profiles collector. [#3077](https://github.com/open-telemetry/opentelemetry-rust/pull/3077) - **Breaking change**: package opentelemetry_proto::tonic::profiles::v1 renamed to opentelemetry_proto::tonic::profiles::v1development. [#3077](https://github.com/open-telemetry/opentelemetry-rust/pull/3077) +- Update `tonic` dependency version to 0.14.1 +- Update `prost` dependency version to 0.14 ## 0.30.0 diff --git a/opentelemetry-proto/Cargo.toml b/opentelemetry-proto/Cargo.toml index a670f5a39c..f8c2813ca2 100644 --- a/opentelemetry-proto/Cargo.toml +++ b/opentelemetry-proto/Cargo.toml @@ -36,7 +36,7 @@ full = ["gen-tonic", "trace", "logs", "metrics", "zpages", "with-serde", "intern # crates used to generate rs files gen-tonic = ["gen-tonic-messages", "tonic/channel"] -gen-tonic-messages = ["tonic", "prost"] +gen-tonic-messages = ["tonic", "tonic-prost", "prost"] # telemetry pillars and functions trace = ["opentelemetry/trace", "opentelemetry_sdk/trace"] @@ -52,7 +52,8 @@ with-schemars = ["schemars"] with-serde = ["serde", "const-hex", "base64", "serde_json"] [dependencies] -tonic = { workspace = true, optional = true, features = ["codegen", "prost"] } +tonic = { workspace = true, optional = true, features = ["codegen"] } +tonic-prost = { workspace = true, optional = true } prost = { workspace = true, optional = true } opentelemetry = { workspace = true } opentelemetry_sdk = { workspace = true } @@ -64,7 +65,7 @@ base64 = { workspace = true, optional = true } [dev-dependencies] opentelemetry = { workspace = true, features = ["testing"] } -tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } prost-build = { workspace = true } tempfile = { workspace = true } serde_json = { workspace = true } diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs index bc9238e340..d9622fbe00 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs @@ -168,7 +168,7 @@ pub mod logs_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.logs.v1.LogsService/Export", ); @@ -315,7 +315,7 @@ pub mod logs_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs index 0da402a848..4f2602101e 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs @@ -168,7 +168,7 @@ pub mod metrics_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", ); @@ -315,7 +315,7 @@ pub mod metrics_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.profiles.v1development.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.profiles.v1development.rs index 8a31c51d0f..2673792adc 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.profiles.v1development.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.profiles.v1development.rs @@ -172,7 +172,7 @@ pub mod profiles_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", ); @@ -318,7 +318,7 @@ pub mod profiles_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs index 5f5aa09ca2..9790eb79b2 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs @@ -168,7 +168,7 @@ pub mod trace_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.trace.v1.TraceService/Export", ); @@ -315,7 +315,7 @@ pub mod trace_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/opentelemetry-proto/tests/grpc_build.rs b/opentelemetry-proto/tests/grpc_build.rs index ed72b5a306..29d0f69978 100644 --- a/opentelemetry-proto/tests/grpc_build.rs +++ b/opentelemetry-proto/tests/grpc_build.rs @@ -25,7 +25,7 @@ fn build_tonic() { let out_dir = TempDir::new().expect("failed to create temp dir to store the generated files"); // build the generated files into OUT_DIR for now so we don't have to touch the src unless we have to - let mut builder = tonic_build::configure() + let mut builder = tonic_prost_build::configure() .build_server(true) .build_client(true) .server_mod_attribute(".", "#[cfg(feature = \"gen-tonic\")]")