From 80955a537c2c2309bc14db49ee625991f3be61d5 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 8 Jan 2025 14:49:34 -0600 Subject: [PATCH] telemetry-subscribers: remove feature flags (#20820) Remove the feature flags from the `telemetry-subscribers` crate. The existing flags were not being properly handled which could have lead to broken compilation if features were enabled/disabled and given we don't make use of feature flags in the sui repo it makes things easier to maintain with these removed. --- crates/telemetry-subscribers/Cargo.toml | 23 ++++++----------------- crates/telemetry-subscribers/src/lib.rs | 1 - 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/crates/telemetry-subscribers/Cargo.toml b/crates/telemetry-subscribers/Cargo.toml index 452ea1f2b7a4d..271a44228c91e 100644 --- a/crates/telemetry-subscribers/Cargo.toml +++ b/crates/telemetry-subscribers/Cargo.toml @@ -10,18 +10,18 @@ publish = false [dependencies] atomic_float.workspace = true -console-subscriber = { workspace = true, optional = true } +console-subscriber.workspace = true crossterm.workspace = true once_cell.workspace = true prometheus.workspace = true tracing.workspace = true tracing-appender.workspace = true tracing-subscriber.workspace = true -opentelemetry = { version = "0.25.0", optional = true } -opentelemetry_sdk = { version = "0.25.0", features = ["rt-tokio"], optional = true } -opentelemetry-otlp = { version = "0.25.0", features = ["grpc-tonic"], optional = true } -tracing-opentelemetry = { version = "0.26.0", optional = true } -opentelemetry-proto = { version = "0.25", optional = true } +opentelemetry = { version = "0.25.0" } +opentelemetry_sdk = { version = "0.25.0", features = ["rt-tokio"] } +opentelemetry-otlp = { version = "0.25.0", features = ["grpc-tonic"] } +tracing-opentelemetry = { version = "0.26.0" } +opentelemetry-proto = { version = "0.25" } tokio = { workspace = true, features = ["full"] } futures.workspace = true clap.workspace = true @@ -33,16 +33,5 @@ bytes-varint = { version = "1" } tonic = { version = "0.12.3" } prost = "0.13" -[features] -default = ["otlp"] -tokio-console = ["console-subscriber"] -otlp = [ - "tracing-opentelemetry", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry-proto", - "opentelemetry_sdk" -] - [dev-dependencies] camino.workspace = true diff --git a/crates/telemetry-subscribers/src/lib.rs b/crates/telemetry-subscribers/src/lib.rs index 1ccd7c65e57cd..43dbeb4a3a8ab 100644 --- a/crates/telemetry-subscribers/src/lib.rs +++ b/crates/telemetry-subscribers/src/lib.rs @@ -363,7 +363,6 @@ impl TelemetryConfig { // tokio-console layer // Please see https://docs.rs/console-subscriber/latest/console_subscriber/struct.Builder.html#configuration // for environment vars/config options - #[cfg(feature = "tokio-console")] if config.tokio_console { layers.push(console_subscriber::spawn().boxed()); }