Skip to content

Commit fe2b2d5

Browse files
authored
Upgrade to tonic 0.11 and prost 0.12 (#1536)
1 parent c05b23d commit fe2b2d5

File tree

13 files changed

+35
-18
lines changed

13 files changed

+35
-18
lines changed

.github/workflows/integration_tests.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
jobs:
99
integration_tests:
10-
rust: stable
1110
runs-on: ubuntu-latest
1211
timeout-minutes: 10
1312
if: ${{ github.event.label.name == 'integration tests' || contains(github.event.pull_request.labels.*.name, 'integration tests') }}
@@ -23,7 +22,7 @@ jobs:
2322
submodules: true
2423
- uses: actions-rs/toolchain@v1
2524
with:
26-
toolchain: ${{ matrix.rust }}
25+
toolchain: stable
2726
components: rustfmt
2827
profile: minimal
2928
- uses: arduino/setup-protoc@v1

Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@ log = "0.4"
4949
once_cell = "1.13"
5050
ordered-float = "4.0"
5151
pin-project-lite = "0.2"
52-
prost = "0.11"
52+
prost = "0.12"
53+
prost-build = "0.12"
54+
prost-types = "0.12"
5355
rand = "0.8"
5456
reqwest = "0.11"
5557
serde = "1.0"
5658
serde_json = "1.0"
5759
surf = "2.0"
5860
temp-env = "0.3.6"
5961
thiserror = "1"
60-
tonic = "0.9"
62+
tonic = "0.11"
63+
tonic-build = "0.11"
6164
tokio = "1"
6265
tokio-stream = "0.1.1"
6366
tracing = "0.1"

examples/tracing-grpc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ tonic = { workspace = true }
2323
serde_json = { workspace = true }
2424

2525
[build-dependencies]
26-
tonic-build = "0.9.2"
26+
tonic-build = { workspace = true }

opentelemetry-jaeger-propagator/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ opentelemetry = { version = "0.21", default-features = false, features = [
2626
], path = "../opentelemetry" }
2727

2828
tonic = { workspace = true, optional = true }
29-
prost = { version = "0.11.6", optional = true }
30-
prost-types = { version = "0.11.6", optional = true }
29+
prost = { workspace = true, optional = true }
30+
prost-types = { workspace = true, optional = true }
3131

3232
[dev-dependencies]
3333
opentelemetry_sdk = { features = ["testing"], path = "../opentelemetry-sdk" }

opentelemetry-jaeger/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## vNext
44

5+
### Changed
6+
7+
- Update to tonic 0.11 and prost 0.12 (#1536)
8+
59
## v0.21.0
610

711
### Changed

opentelemetry-jaeger/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ wasm-bindgen = { version = "0.2", optional = true }
4242
wasm-bindgen-futures = { version = "0.4.18", optional = true }
4343

4444
tonic = { workspace = true, optional = true }
45-
prost = { version = "0.11.6", optional = true }
46-
prost-types = { version = "0.11.6", optional = true }
45+
prost = { workspace = true, optional = true }
46+
prost-types = { workspace = true, optional = true }
4747

4848
# Futures
4949
futures-executor = { workspace = true, features = ["std"], optional = true }

opentelemetry-otlp/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## vNext
44

5+
- Update to tonic 0.11 and prost 0.12 (#1536)
56
- Remove support for grpcio transport (#1534)
67

78
## v0.14.0

opentelemetry-proto/CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
## vNext
44

5-
### Added
5+
### Changed
66

7+
- Update to tonic 0.11 and prost 0.12 (#1536)
78
- Remove support for grpcio transport (#1534)
9+
10+
### Added
11+
812
- Add `schemars::JsonSchema` trait support with `with-schemars` feature (#1419)
913
- Update protobuf definitions to v1.1.0 (#1154)
1014

opentelemetry-proto/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ serde = { workspace = true, optional = true, features = ["serde_derive"] }
5757
hex = { version = "0.4.3", optional = true }
5858

5959
[dev-dependencies]
60-
tonic-build = { version = "0.9.0" }
61-
prost-build = { version = "0.11.1" }
60+
tonic-build = { workspace = true }
61+
prost-build = { workspace = true }
6262
tempfile = "3.3.0"
6363
serde_json = "1.0"

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ pub mod logs_service_server {
300300
request: tonic::Request<super::ExportLogsServiceRequest>,
301301
) -> Self::Future {
302302
let inner = Arc::clone(&self.0);
303-
let fut = async move { (*inner).export(request).await };
303+
let fut = async move {
304+
<T as LogsService>::export(&inner, request).await
305+
};
304306
Box::pin(fut)
305307
}
306308
}

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ pub mod metrics_service_server {
300300
request: tonic::Request<super::ExportMetricsServiceRequest>,
301301
) -> Self::Future {
302302
let inner = Arc::clone(&self.0);
303-
let fut = async move { (*inner).export(request).await };
303+
let fut = async move {
304+
<T as MetricsService>::export(&inner, request).await
305+
};
304306
Box::pin(fut)
305307
}
306308
}

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ pub mod trace_service_server {
300300
request: tonic::Request<super::ExportTraceServiceRequest>,
301301
) -> Self::Future {
302302
let inner = Arc::clone(&self.0);
303-
let fut = async move { (*inner).export(request).await };
303+
let fut = async move {
304+
<T as TraceService>::export(&inner, request).await
305+
};
304306
Box::pin(fut)
305307
}
306308
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub struct ScopeMetrics {
9191
/// |data |---> |Gauge, Sum, Histogram, Summary, ... |
9292
/// +------------+ +------------------------------------+
9393
///
94-
/// Data [One of Gauge, Sum, Histogram, Summary, ...]
94+
/// Data \[One of Gauge, Sum, Histogram, Summary, ...\]
9595
/// +-----------+
9696
/// |... | // Metadata about the Data.
9797
/// |points |--+
@@ -516,7 +516,7 @@ pub struct ExponentialHistogramDataPoint {
516516
pub max: ::core::option::Option<f64>,
517517
/// ZeroThreshold may be optionally set to convey the width of the zero
518518
/// region. Where the zero region is defined as the closed interval
519-
/// [-ZeroThreshold, ZeroThreshold].
519+
/// \[-ZeroThreshold, ZeroThreshold\].
520520
/// When ZeroThreshold is 0, zero count bucket stores values that cannot be
521521
/// expressed using the standard exponential formula as well as values that
522522
/// have been rounded to zero.
@@ -617,7 +617,7 @@ pub mod summary_data_point {
617617
#[derive(Clone, PartialEq, ::prost::Message)]
618618
pub struct ValueAtQuantile {
619619
/// The quantile of a distribution. Must be in the interval
620-
/// [0.0, 1.0].
620+
/// \[0.0, 1.0\].
621621
#[prost(double, tag = "1")]
622622
pub quantile: f64,
623623
/// The value at the given quantile of a distribution.

0 commit comments

Comments
 (0)