Skip to content

chore: update tonic and prost to 0.14 #3093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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", default-features = false }
tonic-prost-build = "0.14"
tonic-prost = "0.14"
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,
Expand Down
10 changes: 6 additions & 4 deletions examples/tracing-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tracing-grpc"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.75.0"
rust-version = "1.86.0"
publish = false
autobenches = false

Expand All @@ -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`
]
2 changes: 1 addition & 1 deletion examples/tracing-grpc/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("proto/helloworld.proto")?;
tonic_prost_build::compile_protos("proto/helloworld.proto")?;
Ok(())
}
2 changes: 2 additions & 0 deletions opentelemetry-otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## vNext

- Bump MSRV to 1.86.0

## 0.30.0

Released 2025-May-23
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "otlp", "logging", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.75.0"
rust-version = "1.86.0"
autotests = false
autobenches = false

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ You can find the release notes (changelog) [here](https://github.com/open-teleme
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.75.0. The current OpenTelemetry version is not guaranteed to build
version is 1.86.0. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "basic-otlp-http"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.75.0"
rust-version = "1.86.0"
publish = false
autobenches = false

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/examples/basic-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "basic-otlp"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.75.0"
rust-version = "1.86.0"
publish = false
autobenches = false

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/tests/integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "integration_test_runner"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.75.0"
rust-version = "1.86.0"
publish = false
autobenches = false

Expand Down
2 changes: 2 additions & 0 deletions opentelemetry-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` and `prost` dependency version to 0.14
- Bump MSRV to 1.86.0

## 0.30.0

Expand Down
9 changes: 5 additions & 4 deletions opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = [
keywords = ["opentelemetry", "otlp", "logging", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.75.0"
rust-version = "1.86.0"
autotests = false
autobenches = false

Expand All @@ -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"]
Expand All @@ -52,7 +52,8 @@ with-schemars = ["schemars"]
with-serde = ["serde", "const-hex", "base64"]

[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 }
Expand All @@ -63,7 +64,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 }
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can find the release notes (changelog) [here](https://github.com/open-teleme
## Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported
version is 1.75.0. The current OpenTelemetry version is not guaranteed to build
version is 1.86.0. The current OpenTelemetry version is not guaranteed to build
on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/tests/grpc_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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\")]")
Expand Down
Loading