Skip to content

Commit 51a63ca

Browse files
authored
Merge branch 'main' into update-deps
2 parents 2467682 + cad63b6 commit 51a63ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+748
-3688
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/checkout@v2
6060
- uses: actions-rs/toolchain@v1
6161
with:
62-
toolchain: nightly-2023-10-10
62+
toolchain: nightly-2024-02-07
6363
components: rustfmt
6464
override: true
6565
- name: external-type-check
@@ -70,7 +70,7 @@ jobs:
7070
non-default-examples:
7171
strategy:
7272
matrix:
73-
example: [opentelemetry-otlp/examples/external-otlp-grpcio-async-std, opentelemetry-otlp/examples/basic-otlp]
73+
example: [opentelemetry-otlp/examples/basic-otlp]
7474
runs-on: ubuntu-latest
7575
steps:
7676
- uses: actions/checkout@v1

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
**/*.rs.bk
55
Cargo.lock
66
/.idea/
7+
8+
.cosine

Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ members = [
1717
"opentelemetry-zipkin",
1818
"opentelemetry-otlp/examples/basic-otlp",
1919
"opentelemetry-otlp/examples/basic-otlp-http",
20-
"opentelemetry-otlp/examples/external-otlp-grpcio-async-std",
2120
"opentelemetry-otlp/tests/integration_test",
2221
"examples/metrics-basic",
2322
"examples/metrics-advanced",
@@ -43,7 +42,6 @@ env_logger = "0.10" # env_logger requires a newer MSRV
4342
futures-core = "0.3"
4443
futures-executor = "0.3"
4544
futures-util = "0.3"
46-
grpcio = "0.12"
4745
hyper = "0.14"
4846
http = "0.2"
4947
isahc = "1.4"

opentelemetry-http/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "opentelemetry-http"
33
version = "0.10.0"
4-
description = "Helper implementations for exchange of traces and metrics over HTTP"
4+
description = "Helper implementations for sending HTTP requests. Uses include propagating and extracting context over http, exporting telemetry, requesting sampling strategies."
55
homepage = "https://github.com/open-telemetry/opentelemetry-rust"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust"
7-
keywords = ["opentelemetry", "tracing", "metrics"]
7+
keywords = ["opentelemetry", "tracing", "context", "propagation"]
88
license = "Apache-2.0"
99
edition = "2021"
1010
rust-version = "1.65"

opentelemetry-http/src/lib.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ pub use bytes::Bytes;
77
pub use http::{Request, Response};
88
use opentelemetry::propagation::{Extractor, Injector};
99

10+
/// Helper for injecting headers into HTTP Requests. This is used for OpenTelemetry context
11+
/// propagation over HTTP.
12+
/// See [this](https://github.com/open-telemetry/opentelemetry-rust/blob/main/examples/tracing-http-propagator/README.md)
13+
/// for example usage.
1014
pub struct HeaderInjector<'a>(pub &'a mut http::HeaderMap);
1115

1216
impl<'a> Injector for HeaderInjector<'a> {
@@ -20,6 +24,10 @@ impl<'a> Injector for HeaderInjector<'a> {
2024
}
2125
}
2226

27+
/// Helper for extracting headers from HTTP Requests. This is used for OpenTelemetry context
28+
/// propagation over HTTP.
29+
/// See [this](https://github.com/open-telemetry/opentelemetry-rust/blob/main/examples/tracing-http-propagator/README.md)
30+
/// for example usage.
2331
pub struct HeaderExtractor<'a>(pub &'a http::HeaderMap);
2432

2533
impl<'a> Extractor for HeaderExtractor<'a> {
@@ -39,7 +47,9 @@ impl<'a> Extractor for HeaderExtractor<'a> {
3947

4048
pub type HttpError = Box<dyn std::error::Error + Send + Sync + 'static>;
4149

42-
/// A minimal interface necessary for export spans over HTTP.
50+
/// A minimal interface necessary for sending requests over HTTP.
51+
/// Used primarily for exporting telemetry over HTTP. Also used for fetching
52+
/// sampling strategies for JaegerRemoteSampler
4353
///
4454
/// Users sometime choose HTTP clients that relay on a certain async runtime. This trait allows
4555
/// users to bring their choice of HTTP client.

opentelemetry-jaeger/src/exporter/config/collector/http_client.rs

+2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ mod collector_client_tests {
188188
use opentelemetry::trace::TraceError;
189189
use opentelemetry_sdk::runtime::Tokio;
190190

191+
// Ignore this test as it is flaky and the opentelemetry-jaeger is on-track for deprecation
192+
#[ignore]
191193
#[test]
192194
fn test_bring_your_own_client() -> Result<(), TraceError> {
193195
let invalid_uri_builder = new_collector_pipeline()

opentelemetry-jaeger/src/exporter/config/collector/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ mod tests {
571571
assert!(valid_uri.is_ok());
572572
}
573573

574+
// Ignore this test as it is flaky and the opentelemetry-jaeger is on-track for deprecation
575+
#[ignore]
574576
#[test]
575577
fn test_collector_exporter() {
576578
let exporter = new_collector_pipeline()

opentelemetry-otlp/CHANGELOG.md

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

33
## vNext
44

5+
- Remove support for grpcio transport (#1534)
6+
57
## v0.14.0
68

79
### Added

opentelemetry-otlp/Cargo.toml

-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ rustdoc-args = ["--cfg", "docsrs"]
2828
[dependencies]
2929
async-trait = { workspace = true }
3030
futures-core = { workspace = true }
31-
grpcio = { workspace = true, optional = true }
3231
opentelemetry = { version = "0.21", default-features = false, path = "../opentelemetry" }
3332
opentelemetry_sdk = { version = "0.21", default-features = false, path = "../opentelemetry-sdk" }
3433
opentelemetry-http = { version = "0.10", path = "../opentelemetry-http", optional = true }
@@ -70,11 +69,6 @@ gzip-tonic = ["tonic/gzip"]
7069
tls = ["tonic/tls"]
7170
tls-roots = ["tls", "tonic/tls-roots"]
7271

73-
# grpc using grpcio
74-
grpc-sys = ["grpcio", "opentelemetry-proto/gen-grpcio"]
75-
openssl = ["grpcio/openssl"]
76-
openssl-vendored = ["grpcio/openssl-vendored"]
77-
7872
# http binary
7973
http-proto = ["prost", "opentelemetry-http", "opentelemetry-proto/gen-tonic-messages", "http", "trace", "metrics"]
8074
reqwest-blocking-client = ["reqwest/blocking", "opentelemetry-http/reqwest"]

opentelemetry-otlp/README.md

+3-19
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ use opentelemetry::trace::Tracer;
4646

4747
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
4848
// use tonic as grpc layer here.
49-
// If you want to use grpcio. enable `grpc-sys` feature and use with_grpcio function here.
5049
let tracer = opentelemetry_otlp::new_pipeline()
5150
.tracing()
5251
.with_exporter(opentelemetry_otlp::new_exporter().tonic())
@@ -71,7 +70,7 @@ automatically.
7170
```toml
7271
[dependencies]
7372
opentelemetry_sdk = { version = "*", features = ["async-std"] }
74-
opentelemetry-otlp = { version = "*", features = ["grpc-sys"] }
73+
opentelemetry-otlp = { version = "*", features = ["grpc-tonic"] }
7574
```
7675

7776
```rust
@@ -84,26 +83,11 @@ let tracer = opentelemetry_otlp::new_pipeline()
8483

8584
## Kitchen Sink Full Configuration
8685

87-
[Example](https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp/#kitchen-sink-full-configuration)
86+
[Example](https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp/#kitchen-sink-full-configuration)
8887
showing how to override all configuration options.
8988

90-
Generally there are two parts of configuration. One is metrics config
89+
Generally there are two parts of configuration. One is metrics config
9190
or tracing config. Users can config it via [`OtlpTracePipeline`]
9291
or [`OtlpMetricPipeline`]. The other is exporting configuration.
9392
Users can set those configurations using [`OtlpExporterPipeline`] based
9493
on the choice of exporters.
95-
96-
# Grpc libraries comparison
97-
98-
Multiple gRPC transport layers are available. [`tonic`](https://crates.io/crates/tonic) is the default gRPC transport
99-
layer and is enabled by default. [`grpcio`](https://crates.io/crates/grpcio) is optional.
100-
101-
| gRPC transport layer | [hyperium/tonic](https://github.com/hyperium/tonic) | [tikv/grpc-rs](https://github.com/tikv/grpc-rs) |
102-
|---|---|---|
103-
| Feature | --features=default | --features=grpc-sys |
104-
| gRPC library | [`tonic`](https://crates.io/crates/tonic) | [`grpcio`](https://crates.io/crates/grpcio) |
105-
| Transport | [hyperium/hyper](https://github.com/hyperium/hyper) (Rust) | [grpc/grpc](https://github.com/grpc/grpc) (C++ binding) |
106-
| TLS support | yes | yes |
107-
| TLS library | rustls | OpenSSL |
108-
| TLS optional | yes | yes |
109-
| Supported .proto generator | [`prost`](https://crates.io/crates/prost) | [`prost`](https://crates.io/crates/prost), [`protobuf`](https://crates.io/crates/protobuf) |

opentelemetry-otlp/examples/external-otlp-grpcio-async-std/Cargo.toml

-18
This file was deleted.

opentelemetry-otlp/examples/external-otlp-grpcio-async-std/README.md

-19
This file was deleted.

opentelemetry-otlp/examples/external-otlp-grpcio-async-std/src/main.rs

-101
This file was deleted.

opentelemetry-otlp/src/exporter/grpcio/logs.rs

-76
This file was deleted.

0 commit comments

Comments
 (0)