Skip to content

Commit 53de9a7

Browse files
committed
chore: update tonic and prost to 0.14
1 parent 42139cb commit 53de9a7

10 files changed

+24
-20
lines changed

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ hyper-util = "0.1"
3232
log = "0.4.21"
3333
once_cell = "1.13"
3434
pin-project-lite = "0.2"
35-
prost = "0.13"
36-
prost-build = "0.13"
37-
prost-types = "0.13"
35+
prost = "0.14"
36+
prost-build = "0.14"
37+
prost-types = "0.14"
3838
rand = { version = "0.9", default-features = false }
3939
reqwest = { version = "0.12", default-features = false }
4040
serde = { version = "1.0", default-features = false }
4141
serde_json = "1.0"
4242
temp-env = "0.3.6"
4343
thiserror = { version = "2", default-features = false }
44-
tonic = { version = "0.13", default-features = false }
45-
tonic-build = "0.13"
44+
tonic = { version = "0.14", default-features = false }
45+
tonic-prost-build = "0.14"
46+
tonic-prost = "0.14"
4647
tokio = { version = "1", default-features = false }
4748
tokio-stream = "0.1"
4849
# Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros,

examples/tracing-grpc/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"]
2323
opentelemetry-stdout = { workspace = true, features = ["trace"] }
2424
prost = { workspace = true }
2525
tokio = { workspace = true, features = ["full"] }
26-
tonic = { workspace = true, features = ["server", "codegen", "channel", "prost", "router"] }
26+
tonic = { workspace = true, features = ["server", "codegen", "channel", "router"] }
27+
tonic-prost = { workspace = true }
2728

2829
[build-dependencies]
29-
tonic-build = { workspace = true }
30+
tonic-prost-build = { workspace = true }
3031

3132
[package.metadata.cargo-machete]
3233
ignored = [

examples/tracing-grpc/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fn main() -> Result<(), Box<dyn std::error::Error>> {
2-
tonic_build::compile_protos("proto/helloworld.proto")?;
2+
tonic_prost_build::compile_protos("proto/helloworld.proto")?;
33
Ok(())
44
}

opentelemetry-proto/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Update proto definitions to v1.7.0.
66
- Added Rust generated protos for profiles collector. [#3077](https://github.com/open-telemetry/opentelemetry-rust/pull/3077)
77
- **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)
8+
- Update `tonic` and `prost` dependency version to 0.14
89

910
## 0.30.0
1011

opentelemetry-proto/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ full = ["gen-tonic", "trace", "logs", "metrics", "zpages", "with-serde", "intern
3636

3737
# crates used to generate rs files
3838
gen-tonic = ["gen-tonic-messages", "tonic/channel"]
39-
gen-tonic-messages = ["tonic", "prost"]
39+
gen-tonic-messages = ["tonic", "tonic-prost", "prost"]
4040

4141
# telemetry pillars and functions
4242
trace = ["opentelemetry/trace", "opentelemetry_sdk/trace"]
@@ -52,7 +52,8 @@ with-schemars = ["schemars"]
5252
with-serde = ["serde", "const-hex", "base64"]
5353

5454
[dependencies]
55-
tonic = { workspace = true, optional = true, features = ["codegen", "prost"] }
55+
tonic = { workspace = true, optional = true, features = ["codegen"] }
56+
tonic-prost = { workspace = true, optional = true }
5657
prost = { workspace = true, optional = true }
5758
opentelemetry = { version = "0.30", default-features = false, path = "../opentelemetry" }
5859
opentelemetry_sdk = { version = "0.30", default-features = false, path = "../opentelemetry-sdk" }
@@ -63,7 +64,7 @@ base64 = { workspace = true, optional = true }
6364

6465
[dev-dependencies]
6566
opentelemetry = { features = ["testing"], path = "../opentelemetry" }
66-
tonic-build = { workspace = true }
67+
tonic-prost-build = { workspace = true }
6768
prost-build = { workspace = true }
6869
tempfile = { workspace = true }
6970
serde_json = { workspace = true }

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub mod logs_service_client {
168168
format!("Service was not ready: {}", e.into()),
169169
)
170170
})?;
171-
let codec = tonic::codec::ProstCodec::default();
171+
let codec = tonic_prost::ProstCodec::default();
172172
let path = http::uri::PathAndQuery::from_static(
173173
"/opentelemetry.proto.collector.logs.v1.LogsService/Export",
174174
);
@@ -315,7 +315,7 @@ pub mod logs_service_server {
315315
let inner = self.inner.clone();
316316
let fut = async move {
317317
let method = ExportSvc(inner);
318-
let codec = tonic::codec::ProstCodec::default();
318+
let codec = tonic_prost::ProstCodec::default();
319319
let mut grpc = tonic::server::Grpc::new(codec)
320320
.apply_compression_config(
321321
accept_compression_encodings,

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub mod metrics_service_client {
168168
format!("Service was not ready: {}", e.into()),
169169
)
170170
})?;
171-
let codec = tonic::codec::ProstCodec::default();
171+
let codec = tonic_prost::ProstCodec::default();
172172
let path = http::uri::PathAndQuery::from_static(
173173
"/opentelemetry.proto.collector.metrics.v1.MetricsService/Export",
174174
);
@@ -315,7 +315,7 @@ pub mod metrics_service_server {
315315
let inner = self.inner.clone();
316316
let fut = async move {
317317
let method = ExportSvc(inner);
318-
let codec = tonic::codec::ProstCodec::default();
318+
let codec = tonic_prost::ProstCodec::default();
319319
let mut grpc = tonic::server::Grpc::new(codec)
320320
.apply_compression_config(
321321
accept_compression_encodings,

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.profiles.v1development.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub mod profiles_service_client {
172172
format!("Service was not ready: {}", e.into()),
173173
)
174174
})?;
175-
let codec = tonic::codec::ProstCodec::default();
175+
let codec = tonic_prost::ProstCodec::default();
176176
let path = http::uri::PathAndQuery::from_static(
177177
"/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export",
178178
);
@@ -318,7 +318,7 @@ pub mod profiles_service_server {
318318
let inner = self.inner.clone();
319319
let fut = async move {
320320
let method = ExportSvc(inner);
321-
let codec = tonic::codec::ProstCodec::default();
321+
let codec = tonic_prost::ProstCodec::default();
322322
let mut grpc = tonic::server::Grpc::new(codec)
323323
.apply_compression_config(
324324
accept_compression_encodings,

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub mod trace_service_client {
168168
format!("Service was not ready: {}", e.into()),
169169
)
170170
})?;
171-
let codec = tonic::codec::ProstCodec::default();
171+
let codec = tonic_prost::ProstCodec::default();
172172
let path = http::uri::PathAndQuery::from_static(
173173
"/opentelemetry.proto.collector.trace.v1.TraceService/Export",
174174
);
@@ -315,7 +315,7 @@ pub mod trace_service_server {
315315
let inner = self.inner.clone();
316316
let fut = async move {
317317
let method = ExportSvc(inner);
318-
let codec = tonic::codec::ProstCodec::default();
318+
let codec = tonic_prost::ProstCodec::default();
319319
let mut grpc = tonic::server::Grpc::new(codec)
320320
.apply_compression_config(
321321
accept_compression_encodings,

opentelemetry-proto/tests/grpc_build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn build_tonic() {
2525
let out_dir = TempDir::new().expect("failed to create temp dir to store the generated files");
2626

2727
// build the generated files into OUT_DIR for now so we don't have to touch the src unless we have to
28-
let mut builder = tonic_build::configure()
28+
let mut builder = tonic_prost_build::configure()
2929
.build_server(true)
3030
.build_client(true)
3131
.server_mod_attribute(".", "#[cfg(feature = \"gen-tonic\")]")

0 commit comments

Comments
 (0)