Skip to content

Commit

Permalink
Upgrade to tonic 0.11 and prost 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Feb 16, 2024
1 parent c05b23d commit ab7f1cf
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 15 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,18 @@ log = "0.4"
once_cell = "1.13"
ordered-float = "4.0"
pin-project-lite = "0.2"
prost = "0.11"
prost = "0.12"
prost-build = "0.12"
prost-types = "0.12"
rand = "0.8"
reqwest = "0.11"
serde = "1.0"
serde_json = "1.0"
surf = "2.0"
temp-env = "0.3.6"
thiserror = "1"
tonic = "0.9"
tonic = "0.11"
tonic-build = "0.11"
tokio = "1"
tokio-stream = "0.1.1"
tracing = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ tonic = { workspace = true }
serde_json = { workspace = true }

[build-dependencies]
tonic-build = "0.9.2"
tonic-build = { workspace = true }
4 changes: 2 additions & 2 deletions opentelemetry-jaeger-propagator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ opentelemetry = { version = "0.21", default-features = false, features = [
], path = "../opentelemetry" }

tonic = { workspace = true, optional = true }
prost = { version = "0.11.6", optional = true }
prost-types = { version = "0.11.6", optional = true }
prost = { workspace = true, optional = true }
prost-types = { workspace = true, optional = true }

[dev-dependencies]
opentelemetry_sdk = { features = ["testing"], path = "../opentelemetry-sdk" }
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4.18", optional = true }

tonic = { workspace = true, optional = true }
prost = { version = "0.11.6", optional = true }
prost-types = { version = "0.11.6", optional = true }
prost = { workspace = true, optional = true }
prost-types = { workspace = true, optional = true }

# Futures
futures-executor = { workspace = true, features = ["std"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ serde = { workspace = true, optional = true, features = ["serde_derive"] }
hex = { version = "0.4.3", optional = true }

[dev-dependencies]
tonic-build = { version = "0.9.0" }
prost-build = { version = "0.11.1" }
tonic-build = { workspace = true }
prost-build = { workspace = true }
tempfile = "3.3.0"
serde_json = "1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ pub mod logs_service_server {
request: tonic::Request<super::ExportLogsServiceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).export(request).await };
let fut = async move {
<T as LogsService>::export(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ pub mod metrics_service_server {
request: tonic::Request<super::ExportMetricsServiceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).export(request).await };
let fut = async move {
<T as MetricsService>::export(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ pub mod trace_service_server {
request: tonic::Request<super::ExportTraceServiceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).export(request).await };
let fut = async move {
<T as TraceService>::export(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub struct ScopeMetrics {
/// |data |---> |Gauge, Sum, Histogram, Summary, ... |
/// +------------+ +------------------------------------+
///
/// Data [One of Gauge, Sum, Histogram, Summary, ...]
/// Data \[One of Gauge, Sum, Histogram, Summary, ...\]
/// +-----------+
/// |... | // Metadata about the Data.
/// |points |--+
Expand Down Expand Up @@ -516,7 +516,7 @@ pub struct ExponentialHistogramDataPoint {
pub max: ::core::option::Option<f64>,
/// ZeroThreshold may be optionally set to convey the width of the zero
/// region. Where the zero region is defined as the closed interval
/// [-ZeroThreshold, ZeroThreshold].
/// \[-ZeroThreshold, ZeroThreshold\].
/// When ZeroThreshold is 0, zero count bucket stores values that cannot be
/// expressed using the standard exponential formula as well as values that
/// have been rounded to zero.
Expand Down Expand Up @@ -617,7 +617,7 @@ pub mod summary_data_point {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueAtQuantile {
/// The quantile of a distribution. Must be in the interval
/// [0.0, 1.0].
/// \[0.0, 1.0\].
#[prost(double, tag = "1")]
pub quantile: f64,
/// The value at the given quantile of a distribution.
Expand Down

0 comments on commit ab7f1cf

Please sign in to comment.