Skip to content

Commit 01ccecf

Browse files
committed
bump tonic to 0.14
1 parent f8e5041 commit 01ccecf

17 files changed

+213
-196
lines changed

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,19 @@ 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 = "0.14"
46+
tonic-build = "0.14"
47+
tonic-prost-build = "0.14"
4648
tokio = { version = "1", default-features = false }
4749
tokio-stream = "0.1"
4850
# 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ opentelemetry_sdk = { workspace = true, 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]
2930
tonic-build = { workspace = true }
31+
tonic-prost-build = { workspace = true }
3032

3133
[package.metadata.cargo-machete]
3234
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-otlp/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNext
44

55
- Add HTTP compression support with `gzip-http` and `zstd-http` feature flags
6+
- Update `tonic` dependency version to 0.14
67

78
## 0.30.0
89

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` dependency version to 0.14
89

910
## 0.30.0
1011

opentelemetry-proto/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ default = ["full"]
3535
full = ["gen-tonic", "trace", "logs", "metrics", "zpages", "with-serde", "internal-logs"]
3636

3737
# crates used to generate rs files
38-
gen-tonic = ["gen-tonic-messages", "tonic/channel"]
39-
gen-tonic-messages = ["tonic", "prost"]
38+
gen-tonic = ["gen-tonic-messages", "tonic/channel", "tonic-prost"]
39+
gen-tonic-messages = ["tonic", "prost", "tonic-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", "serde_json"]
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 = { workspace = true }
5859
opentelemetry_sdk = { workspace = true }
@@ -65,6 +66,7 @@ base64 = { workspace = true, optional = true }
6566
[dev-dependencies]
6667
opentelemetry = { workspace = true, features = ["testing"] }
6768
tonic-build = { workspace = true }
69+
tonic-prost-build = { workspace = true }
6870
prost-build = { workspace = true }
6971
tempfile = { workspace = true }
7072
serde_json = { workspace = true }

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct ExportLogsServiceRequest {
1717
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
1818
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
1919
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
20-
#[derive(Clone, PartialEq, ::prost::Message)]
20+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2121
pub struct ExportLogsServiceResponse {
2222
/// The details of a partially successful export request.
2323
///
@@ -31,7 +31,7 @@ pub struct ExportLogsServiceResponse {
3131
/// In such cases, the `rejected_<signal>` MUST have a value of `0` and
3232
/// the `error_message` MUST be non-empty.
3333
///
34-
/// A `partial_success` message with an empty value (rejected_<signal> = 0 and
34+
/// A `partial_success` message with an empty value (rejected\_<signal> = 0 and
3535
/// `error_message` = "") is equivalent to it not being set/present. Senders
3636
/// SHOULD interpret it the same way as in the full success case.
3737
#[prost(message, optional, tag = "1")]
@@ -40,7 +40,7 @@ pub struct ExportLogsServiceResponse {
4040
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
4141
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
4242
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
43-
#[derive(Clone, PartialEq, ::prost::Message)]
43+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4444
pub struct ExportLogsPartialSuccess {
4545
/// The number of rejected log records.
4646
///
@@ -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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct ExportMetricsServiceRequest {
1717
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
1818
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
1919
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
20-
#[derive(Clone, PartialEq, ::prost::Message)]
20+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2121
pub struct ExportMetricsServiceResponse {
2222
/// The details of a partially successful export request.
2323
///
@@ -31,7 +31,7 @@ pub struct ExportMetricsServiceResponse {
3131
/// In such cases, the `rejected_<signal>` MUST have a value of `0` and
3232
/// the `error_message` MUST be non-empty.
3333
///
34-
/// A `partial_success` message with an empty value (rejected_<signal> = 0 and
34+
/// A `partial_success` message with an empty value (rejected\_<signal> = 0 and
3535
/// `error_message` = "") is equivalent to it not being set/present. Senders
3636
/// SHOULD interpret it the same way as in the full success case.
3737
#[prost(message, optional, tag = "1")]
@@ -40,7 +40,7 @@ pub struct ExportMetricsServiceResponse {
4040
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
4141
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
4242
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
43-
#[derive(Clone, PartialEq, ::prost::Message)]
43+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4444
pub struct ExportMetricsPartialSuccess {
4545
/// The number of rejected data points.
4646
///
@@ -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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct ExportProfilesServiceRequest {
2222
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
2323
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
2424
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
25-
#[derive(Clone, PartialEq, ::prost::Message)]
25+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2626
pub struct ExportProfilesServiceResponse {
2727
/// The details of a partially successful export request.
2828
///
@@ -36,7 +36,7 @@ pub struct ExportProfilesServiceResponse {
3636
/// In such cases, the `rejected_<signal>` MUST have a value of `0` and
3737
/// the `error_message` MUST be non-empty.
3838
///
39-
/// A `partial_success` message with an empty value (rejected_<signal> = 0 and
39+
/// A `partial_success` message with an empty value (rejected\_<signal> = 0 and
4040
/// `error_message` = "") is equivalent to it not being set/present. Senders
4141
/// SHOULD interpret it the same way as in the full success case.
4242
#[prost(message, optional, tag = "1")]
@@ -45,7 +45,7 @@ pub struct ExportProfilesServiceResponse {
4545
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
4646
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
4747
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
48-
#[derive(Clone, PartialEq, ::prost::Message)]
48+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4949
pub struct ExportProfilesPartialSuccess {
5050
/// The number of rejected profiles.
5151
///
@@ -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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct ExportTraceServiceRequest {
1717
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
1818
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
1919
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
20-
#[derive(Clone, PartialEq, ::prost::Message)]
20+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2121
pub struct ExportTraceServiceResponse {
2222
/// The details of a partially successful export request.
2323
///
@@ -31,7 +31,7 @@ pub struct ExportTraceServiceResponse {
3131
/// In such cases, the `rejected_<signal>` MUST have a value of `0` and
3232
/// the `error_message` MUST be non-empty.
3333
///
34-
/// A `partial_success` message with an empty value (rejected_<signal> = 0 and
34+
/// A `partial_success` message with an empty value (rejected\_<signal> = 0 and
3535
/// `error_message` = "") is equivalent to it not being set/present. Senders
3636
/// SHOULD interpret it the same way as in the full success case.
3737
#[prost(message, optional, tag = "1")]
@@ -40,7 +40,7 @@ pub struct ExportTraceServiceResponse {
4040
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
4141
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
4242
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
43-
#[derive(Clone, PartialEq, ::prost::Message)]
43+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4444
pub struct ExportTracePartialSuccess {
4545
/// The number of rejected spans.
4646
///
@@ -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,

0 commit comments

Comments
 (0)