Skip to content
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

chore: update tonic to 0.13 #2876

Merged
merged 1 commit into from
Mar 27, 2025
Merged
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "opentelemetry-proto/src/proto/opentelemetry-proto"]
path = opentelemetry-proto/src/proto/opentelemetry-proto
url = https://github.com/open-telemetry/opentelemetry-proto
branch = tags/v1.0.0
branch = tags/v1.5.0
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ exclude = ["opentelemetry-prometheus"]
debug = 1

[workspace.dependencies]
async-std = "1.13"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

async-trait = "0.1"
bytes = "1"
criterion = "0.5"
Expand All @@ -42,8 +41,8 @@ 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.12.3", default-features = false }
tonic-build = "0.12"
tonic = { version = "0.13", default-features = false }
tonic-build = "0.13"
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
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

- Update `tonic` dependency version to 0.13

## 0.29.0

Released 2025-Mar-21
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ opentelemetry_sdk = { features = ["trace", "rt-tokio", "testing"], path = "../op
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
futures-util = { workspace = true }
temp-env = { workspace = true }
tonic = { workspace = true, features = ["server"] }
tonic = { workspace = true, features = ["router", "server"] }

[features]
# telemetry pillars and functions
Expand All @@ -67,8 +67,8 @@ default = ["http-proto", "reqwest-blocking-client", "trace", "metrics", "logs",
grpc-tonic = ["tonic", "prost", "http", "tokio", "opentelemetry-proto/gen-tonic"]
gzip-tonic = ["tonic/gzip"]
zstd-tonic = ["tonic/zstd"]
tls = ["tonic/tls"]
tls-roots = ["tls", "tonic/tls-roots"]
tls = ["tonic/tls-ring"]
tls-roots = ["tls", "tonic/tls-native-roots"]
tls-webpki-roots = ["tls", "tonic/tls-webpki-roots"]

# http binary
Expand Down
2 changes: 2 additions & 0 deletions opentelemetry-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## vNext

- Update `tonic` dependency version to 0.13

## 0.29.0

Released 2025-Mar-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub mod logs_service_client {
}
impl<T> LogsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
Expand All @@ -111,13 +111,13 @@ pub mod logs_service_client {
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
LogsServiceClient::new(InterceptedService::new(inner, interceptor))
Expand Down Expand Up @@ -278,7 +278,7 @@ pub mod logs_service_server {
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
Expand Down Expand Up @@ -336,7 +336,9 @@ pub mod logs_service_server {
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(empty_body());
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub mod metrics_service_client {
}
impl<T> MetricsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
Expand All @@ -111,13 +111,13 @@ pub mod metrics_service_client {
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
MetricsServiceClient::new(InterceptedService::new(inner, interceptor))
Expand Down Expand Up @@ -278,7 +278,7 @@ pub mod metrics_service_server {
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
Expand Down Expand Up @@ -336,7 +336,9 @@ pub mod metrics_service_server {
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(empty_body());
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub mod trace_service_client {
}
impl<T> TraceServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
Expand All @@ -111,13 +111,13 @@ pub mod trace_service_client {
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
TraceServiceClient::new(InterceptedService::new(inner, interceptor))
Expand Down Expand Up @@ -278,7 +278,7 @@ pub mod trace_service_server {
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
Expand Down Expand Up @@ -336,7 +336,9 @@ pub mod trace_service_server {
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(empty_body());
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub struct Metric {
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// unit in which the metric value is reported. Follows the format
/// described by <http://unitsofmeasure.org/ucum.html.>
/// described by <https://unitsofmeasure.org/ucum.html.>
#[prost(string, tag = "3")]
pub unit: ::prost::alloc::string::String,
/// Additional metadata attributes that describe the metric. \[Optional\].
Expand Down Expand Up @@ -292,7 +292,7 @@ pub struct ExponentialHistogram {
}
/// Summary metric data are used to convey quantile summaries,
/// a Prometheus (see: <https://prometheus.io/docs/concepts/metric_types/#summary>)
/// and OpenMetrics (see: <https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45>)
/// and OpenMetrics (see: <https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45>)
/// data type. These data points cannot always be merged in a meaningful way.
/// While they can be useful in some applications, histogram data points are
/// recommended for new applications.
Expand Down Expand Up @@ -448,7 +448,9 @@ pub struct HistogramDataPoint {
/// The sum of the bucket_counts must equal the value in the count field.
///
/// The number of elements in bucket_counts array must be by one greater than
/// the number of elements in explicit_bounds array.
/// the number of elements in explicit_bounds array. The exception to this rule
/// is when the length of bucket_counts is 0, then the length of explicit_bounds
/// must also be 0.
#[prost(fixed64, repeated, tag = "6")]
pub bucket_counts: ::prost::alloc::vec::Vec<u64>,
/// explicit_bounds specifies buckets with explicitly defined bounds for values.
Expand All @@ -464,6 +466,9 @@ pub struct HistogramDataPoint {
/// Histogram buckets are inclusive of their upper boundary, except the last
/// bucket where the boundary is at infinity. This format is intentionally
/// compatible with the OpenMetrics histogram definition.
///
/// If bucket_counts length is 0 then explicit_bounds length must also be 0,
/// otherwise the data point is invalid.
#[prost(double, repeated, tag = "7")]
pub explicit_bounds: ::prost::alloc::vec::Vec<f64>,
/// (Optional) List of exemplars collected from
Expand Down