From ff1792356e4094b0938c5a5ca34afc581bbde543 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 18:07:22 +0000 Subject: [PATCH 1/6] tonic with no default deps --- examples/tracing-grpc/Cargo.toml | 2 +- opentelemetry-otlp/Cargo.toml | 2 +- opentelemetry-proto/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index c4ba3e1105..55a4f9f286 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -19,7 +19,7 @@ opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true } +tonic = { workspace = true, default-features = false } serde_json = { workspace = true } [build-dependencies] diff --git a/opentelemetry-otlp/Cargo.toml b/opentelemetry-otlp/Cargo.toml index 272481053e..54255b2c16 100644 --- a/opentelemetry-otlp/Cargo.toml +++ b/opentelemetry-otlp/Cargo.toml @@ -35,7 +35,7 @@ opentelemetry-proto = { version = "0.26", path = "../opentelemetry-proto", defau tracing = {workspace = true, optional = true} prost = { workspace = true, optional = true } -tonic = { workspace = true, optional = true } +tonic = { workspace = true, default-features = false, optional = true } tokio = { workspace = true, features = ["sync", "rt"], optional = true } reqwest = { workspace = true, optional = true } diff --git a/opentelemetry-proto/Cargo.toml b/opentelemetry-proto/Cargo.toml index 9be1a9642c..d37289e542 100644 --- a/opentelemetry-proto/Cargo.toml +++ b/opentelemetry-proto/Cargo.toml @@ -49,7 +49,7 @@ with-serde = ["serde", "hex"] populate-logs-event-name = [] [dependencies] -tonic = { workspace = true, optional = true, features = ["codegen", "prost"] } +tonic = { workspace = true, optional = true, default-features = false, features = ["codegen", "prost"] } prost = { workspace = true, optional = true } opentelemetry = { version = "0.26", default-features = false, path = "../opentelemetry" } opentelemetry_sdk = { version = "0.26", default-features = false, path = "../opentelemetry-sdk" } From 37af26ed0d4e2dca04d097e70fb3aace4c194a57 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 18:29:54 +0000 Subject: [PATCH 2/6] build explicit config --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a91ecbb4e0..7b86aa63de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ serde_json = "1.0" temp-env = "0.3.6" thiserror = { version = "1", default-features = false } tonic = { version = "0.12.3", default-features = false } -tonic-build = "0.12" +tonic-build = { version = "0.12", default-features = false, features = ["prost", "transport"]} tokio = { version = "1", default-features = false } tokio-stream = "0.1" tracing = { version = "0.1", default-features = false } From f24cc9db0f7c9dd5b4f98540752f8fc870cc8f6d Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 18:37:50 +0000 Subject: [PATCH 3/6] fixed diff --- examples/tracing-grpc/Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index 55a4f9f286..7833dd7319 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -19,8 +19,7 @@ opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, default-features = false } -serde_json = { workspace = true } +tonic = { workspace = true, default-features = false, features = ["server"] } [build-dependencies] tonic-build = { workspace = true } From e1b2c72cb891786059a1d06a91cc14047c7ab9ba Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 18:57:27 +0000 Subject: [PATCH 4/6] no grpc at all --- examples/tracing-grpc/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index 8bf014fe90..308833e06d 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -19,7 +19,9 @@ opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] opentelemetry-stdout = { workspace = true, features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, default-features = false, features = ["server"] } +tonic = { workspace = true, default-features = false, features = [ + "transport", "codegen", "prost" +] } [build-dependencies] tonic-build = { workspace = true } From 3cf2f8e9dbd66f0e9dacf9958c703812f775935e Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 18:59:59 +0000 Subject: [PATCH 5/6] more sync with other PR --- examples/tracing-grpc/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index 308833e06d..a1dd6b8905 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -20,7 +20,7 @@ opentelemetry-stdout = { workspace = true, features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } tonic = { workspace = true, default-features = false, features = [ - "transport", "codegen", "prost" + "transport", "codegen", "prost", "channel" ] } [build-dependencies] From 75c1610a6c812c99f42678a982271efc377df31c Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Wed, 26 Feb 2025 19:15:24 +0000 Subject: [PATCH 6/6] removed non needed attr --- examples/tracing-grpc/Cargo.toml | 3 --- opentelemetry-otlp/Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index ec43d1cacc..438efe7295 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -19,9 +19,6 @@ opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] opentelemetry-stdout = { workspace = true, features = ["trace"] } prost = { workspace = true } tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, default-features = false, features = [ - "transport", "codegen", "prost", "channel" -] } tonic = { workspace = true, features = ["server", "codegen", "channel", "prost"] } [build-dependencies] diff --git a/opentelemetry-otlp/Cargo.toml b/opentelemetry-otlp/Cargo.toml index 9e7cfb79b0..2e0fd8cf4c 100644 --- a/opentelemetry-otlp/Cargo.toml +++ b/opentelemetry-otlp/Cargo.toml @@ -34,7 +34,7 @@ opentelemetry-proto = { version = "0.28", path = "../opentelemetry-proto", defau tracing = {workspace = true, optional = true} prost = { workspace = true, optional = true } -tonic = { workspace = true, default-features = false, optional = true } +tonic = { workspace = true, optional = true } tokio = { workspace = true, features = ["sync", "rt"], optional = true } reqwest = { workspace = true, optional = true }