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

Remove the option of using grpcio for gRPC #1534

Merged
merged 1 commit into from
Feb 15, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
non-default-examples:
strategy:
matrix:
example: [opentelemetry-otlp/examples/external-otlp-grpcio-async-std, opentelemetry-otlp/examples/basic-otlp]
example: [opentelemetry-otlp/examples/basic-otlp]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ members = [
"opentelemetry-zipkin",
"opentelemetry-otlp/examples/basic-otlp",
"opentelemetry-otlp/examples/basic-otlp-http",
"opentelemetry-otlp/examples/external-otlp-grpcio-async-std",
"opentelemetry-otlp/tests/integration_test",
"examples/metrics-basic",
"examples/metrics-advanced",
Expand All @@ -43,7 +42,6 @@ env_logger = "0.10"
futures-core = "0.3"
futures-executor = "0.3"
futures-util = "0.3"
grpcio = "0.12"
hyper = "0.14"
http = "0.2"
isahc = "1.4"
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

- Remove support for grpcio transport (#1534)

## v0.14.0

### Added
Expand Down
6 changes: 0 additions & 6 deletions opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
async-trait = { workspace = true }
futures-core = { workspace = true }
grpcio = { workspace = true, optional = true }
opentelemetry = { version = "0.21", default-features = false, path = "../opentelemetry" }
opentelemetry_sdk = { version = "0.21", default-features = false, path = "../opentelemetry-sdk" }
opentelemetry-http = { version = "0.10", path = "../opentelemetry-http", optional = true }
Expand Down Expand Up @@ -71,11 +70,6 @@ gzip-tonic = ["tonic/gzip"]
tls = ["tonic/tls"]
tls-roots = ["tls", "tonic/tls-roots"]

# grpc using grpcio
grpc-sys = ["grpcio", "opentelemetry-proto/gen-grpcio"]
openssl = ["grpcio/openssl"]
openssl-vendored = ["grpcio/openssl-vendored"]

# http binary
http-proto = ["prost", "opentelemetry-http", "opentelemetry-proto/gen-tonic-messages", "http", "trace", "metrics"]
reqwest-blocking-client = ["reqwest/blocking", "opentelemetry-http/reqwest"]
Expand Down
22 changes: 3 additions & 19 deletions opentelemetry-otlp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use opentelemetry::trace::Tracer;

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

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

## Kitchen Sink Full Configuration

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

Generally there are two parts of configuration. One is metrics config
Generally there are two parts of configuration. One is metrics config
or tracing config. Users can config it via [`OtlpTracePipeline`]
or [`OtlpMetricPipeline`]. The other is exporting configuration.
Users can set those configurations using [`OtlpExporterPipeline`] based
on the choice of exporters.

# Grpc libraries comparison

Multiple gRPC transport layers are available. [`tonic`](https://crates.io/crates/tonic) is the default gRPC transport
layer and is enabled by default. [`grpcio`](https://crates.io/crates/grpcio) is optional.

| gRPC transport layer | [hyperium/tonic](https://github.com/hyperium/tonic) | [tikv/grpc-rs](https://github.com/tikv/grpc-rs) |
|---|---|---|
| Feature | --features=default | --features=grpc-sys |
| gRPC library | [`tonic`](https://crates.io/crates/tonic) | [`grpcio`](https://crates.io/crates/grpcio) |
| Transport | [hyperium/hyper](https://github.com/hyperium/hyper) (Rust) | [grpc/grpc](https://github.com/grpc/grpc) (C++ binding) |
| TLS support | yes | yes |
| TLS library | rustls | OpenSSL |
| TLS optional | yes | yes |
| Supported .proto generator | [`prost`](https://crates.io/crates/prost) | [`prost`](https://crates.io/crates/prost), [`protobuf`](https://crates.io/crates/protobuf) |

This file was deleted.

This file was deleted.

This file was deleted.

76 changes: 0 additions & 76 deletions opentelemetry-otlp/src/exporter/grpcio/logs.rs

This file was deleted.