From 7117e522febb946fe0e689562b7cd20ad78ad461 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Tue, 17 Dec 2024 04:41:56 -0800 Subject: [PATCH 1/3] initial commit --- .github/workflows/ci.yml | 16 ++++++++++++++++ Cargo.toml | 3 +++ examples/logs-basic/Cargo.toml | 2 -- examples/metrics-advanced/Cargo.toml | 1 - examples/metrics-basic/Cargo.toml | 1 - examples/tracing-grpc/Cargo.toml | 2 -- examples/tracing-jaeger/Cargo.toml | 1 - .../examples/basic-otlp-http/Cargo.toml | 7 ------- .../examples/basic-otlp/Cargo.toml | 2 -- opentelemetry-stdout/Cargo.toml | 4 +++- stress/Cargo.toml | 1 - 11 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a060b7e60..82cd75a6a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,3 +155,19 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: fail_ci_if_error: true + cargo-machete: + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: taiki-e/install-action@v2 + with: + tool: cargo-machete + - name: cargo machete + run: cargo machete diff --git a/Cargo.toml b/Cargo.toml index 99d8906132..1c272e6925 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,3 +51,6 @@ tracing = { version = ">=0.1.40", default-features = false } tracing-core = { version = ">=0.1.33", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } url = { version = "2.5", default-features = false } + +[workspace.metadata.cargo-machete] +ignored = ["tracing"] diff --git a/examples/logs-basic/Cargo.toml b/examples/logs-basic/Cargo.toml index 52b8182e31..00321af4fc 100644 --- a/examples/logs-basic/Cargo.toml +++ b/examples/logs-basic/Cargo.toml @@ -6,10 +6,8 @@ license = "Apache-2.0" publish = false [dependencies] -opentelemetry = { path = "../../opentelemetry", features = ["logs"] } opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["logs"] } opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["logs"]} opentelemetry-appender-tracing = { path = "../../opentelemetry-appender-tracing", default-features = false} -opentelemetry-semantic-conventions = { path = "../../opentelemetry-semantic-conventions" } tracing = { workspace = true, features = ["std"]} tracing-subscriber = { workspace = true, features = ["registry", "std"] } diff --git a/examples/metrics-advanced/Cargo.toml b/examples/metrics-advanced/Cargo.toml index 611bec1352..31cdf73a89 100644 --- a/examples/metrics-advanced/Cargo.toml +++ b/examples/metrics-advanced/Cargo.toml @@ -10,4 +10,3 @@ opentelemetry = { path = "../../opentelemetry", features = ["metrics"] } opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["spec_unstable_metrics_views", "rt-tokio"] } opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["metrics"] } tokio = { workspace = true, features = ["full"] } -serde_json = { workspace = true } diff --git a/examples/metrics-basic/Cargo.toml b/examples/metrics-basic/Cargo.toml index b68573e60a..69a8fc8628 100644 --- a/examples/metrics-basic/Cargo.toml +++ b/examples/metrics-basic/Cargo.toml @@ -10,5 +10,4 @@ opentelemetry = { path = "../../opentelemetry", features = ["metrics"] } opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["metrics", "rt-tokio"] } opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["metrics"]} tokio = { workspace = true, features = ["full"] } -serde_json = { workspace = true } diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index c4ba3e1105..fc51047c13 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -17,10 +17,8 @@ path = "src/client.rs" opentelemetry = { path = "../../opentelemetry" } 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 } -serde_json = { workspace = true } [build-dependencies] tonic-build = { workspace = true } diff --git a/examples/tracing-jaeger/Cargo.toml b/examples/tracing-jaeger/Cargo.toml index 809365c66b..6257f0ebf0 100644 --- a/examples/tracing-jaeger/Cargo.toml +++ b/examples/tracing-jaeger/Cargo.toml @@ -9,5 +9,4 @@ publish = false opentelemetry = { path = "../../opentelemetry" } opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] } opentelemetry-otlp = { path = "../../opentelemetry-otlp", features = ["tonic"] } -opentelemetry-semantic-conventions = { path = "../../opentelemetry-semantic-conventions" } tokio = { workspace = true, features = ["full"] } diff --git a/opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml b/opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml index 4549607738..0c0c099024 100644 --- a/opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml +++ b/opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml @@ -16,16 +16,9 @@ experimental_metrics_periodicreader_with_async_runtime = ["opentelemetry_sdk/exp once_cell = { workspace = true } opentelemetry = { path = "../../../opentelemetry" } opentelemetry_sdk = { path = "../../../opentelemetry-sdk", features = ["rt-tokio", "experimental_metrics_periodicreader_with_async_runtime"]} -opentelemetry-http = { path = "../../../opentelemetry-http", optional = true, default-features = false} opentelemetry-otlp = { path = "../..", features = ["http-proto", "http-json", "logs"] , default-features = false} opentelemetry-appender-tracing = { path = "../../../opentelemetry-appender-tracing", default-features = false} -opentelemetry-semantic-conventions = { path = "../../../opentelemetry-semantic-conventions" } -async-trait = { workspace = true, optional = true } -bytes = { workspace = true, optional = true } -http = { workspace = true, optional = true } -http-body-util = { workspace = true, optional = true } tokio = { workspace = true, features = ["full"] } tracing = { workspace = true, features = ["std"]} -tracing-core = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter","registry", "std", "fmt"] } diff --git a/opentelemetry-otlp/examples/basic-otlp/Cargo.toml b/opentelemetry-otlp/examples/basic-otlp/Cargo.toml index 36d093154f..ad050bc338 100644 --- a/opentelemetry-otlp/examples/basic-otlp/Cargo.toml +++ b/opentelemetry-otlp/examples/basic-otlp/Cargo.toml @@ -10,9 +10,7 @@ once_cell = { workspace = true } opentelemetry = { path = "../../../opentelemetry" } opentelemetry_sdk = { path = "../../../opentelemetry-sdk", features = ["rt-tokio"] } opentelemetry-otlp = { path = "../../../opentelemetry-otlp" } -opentelemetry-semantic-conventions = { path = "../../../opentelemetry-semantic-conventions" } tokio = { version = "1.0", features = ["full"] } opentelemetry-appender-tracing = { path = "../../../opentelemetry-appender-tracing", default-features = false} tracing = { workspace = true, features = ["std"]} -tracing-core = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter","registry", "std", "fmt"] } \ No newline at end of file diff --git a/opentelemetry-stdout/Cargo.toml b/opentelemetry-stdout/Cargo.toml index 40221a9d41..d3d4a8b731 100644 --- a/opentelemetry-stdout/Cargo.toml +++ b/opentelemetry-stdout/Cargo.toml @@ -34,7 +34,6 @@ futures-util = { workspace = true, optional = true } opentelemetry = { version = "0.27", path = "../opentelemetry" } opentelemetry_sdk = { version = "0.27", path = "../opentelemetry-sdk" } serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } ordered-float = { workspace = true } [dev-dependencies] @@ -46,3 +45,6 @@ tracing = { workspace = true, features = ["std"]} tracing-subscriber = { workspace = true, features = ["registry", "std"] } tokio = { workspace = true, features = ["full"] } once_cell = { workspace = true } + +[package.metadata.cargo-machete] +ignored = ["thiserror"] diff --git a/stress/Cargo.toml b/stress/Cargo.toml index e8ebe6cd37..b4b86ba330 100644 --- a/stress/Cargo.toml +++ b/stress/Cargo.toml @@ -51,7 +51,6 @@ tracing = { workspace = true, features = ["std"]} tracing-subscriber = { workspace = true, features = ["registry", "std"] } num-format = "0.4.4" sysinfo = { version = "0.32", optional = true } -libc = "0.2" async-trait = "0.1.51" futures-executor = { workspace = true } From 5bda08e6e61593dae32367de43c4fe6b09911358 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Tue, 17 Dec 2024 04:49:01 -0800 Subject: [PATCH 2/3] fix --- .github/workflows/ci.yml | 16 ---------------- examples/tracing-grpc/Cargo.toml | 1 + opentelemetry-stdout/Cargo.toml | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82cd75a6a0..2a060b7e60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,19 +155,3 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: fail_ci_if_error: true - cargo-machete: - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: taiki-e/install-action@v2 - with: - tool: cargo-machete - - name: cargo machete - run: cargo machete diff --git a/examples/tracing-grpc/Cargo.toml b/examples/tracing-grpc/Cargo.toml index fc51047c13..c836904a37 100644 --- a/examples/tracing-grpc/Cargo.toml +++ b/examples/tracing-grpc/Cargo.toml @@ -17,6 +17,7 @@ path = "src/client.rs" opentelemetry = { path = "../../opentelemetry" } 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 } diff --git a/opentelemetry-stdout/Cargo.toml b/opentelemetry-stdout/Cargo.toml index d3d4a8b731..7061a5831b 100644 --- a/opentelemetry-stdout/Cargo.toml +++ b/opentelemetry-stdout/Cargo.toml @@ -45,6 +45,3 @@ tracing = { workspace = true, features = ["std"]} tracing-subscriber = { workspace = true, features = ["registry", "std"] } tokio = { workspace = true, features = ["full"] } once_cell = { workspace = true } - -[package.metadata.cargo-machete] -ignored = ["thiserror"] From d36254e9c2a0f812c385a9468652fd6f068a8738 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Tue, 17 Dec 2024 04:50:11 -0800 Subject: [PATCH 3/3] remove mach --- Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c272e6925..99d8906132 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,3 @@ tracing = { version = ">=0.1.40", default-features = false } tracing-core = { version = ">=0.1.33", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } url = { version = "2.5", default-features = false } - -[workspace.metadata.cargo-machete] -ignored = ["tracing"]