diff --git a/Cargo.lock b/Cargo.lock index 50dd34fcae589..edeb2c4fd540e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1614,20 +1614,6 @@ dependencies = [ "itertools", ] -[[package]] -name = "crossbeam" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" -dependencies = [ - "cfg-if", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - [[package]] name = "crossbeam-channel" version = "0.5.6" @@ -3750,12 +3736,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" - [[package]] name = "jsonrpsee" version = "0.16.1" @@ -9557,7 +9537,6 @@ dependencies = [ "tracing", "tracing-appender", "tracing-bunyan-formatter", - "tracing-chrome", "tracing-opentelemetry", "tracing-subscriber 0.3.16", "workspace-hack", @@ -10221,18 +10200,6 @@ dependencies = [ "tracing-subscriber 0.3.16", ] -[[package]] -name = "tracing-chrome" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ac1f6a3a47e9c755e65ef974653c978da2246487a16044a8ee1d9a0a67257c" -dependencies = [ - "crossbeam", - "json", - "tracing", - "tracing-subscriber 0.3.16", -] - [[package]] name = "tracing-core" version = "0.1.30" @@ -11114,7 +11081,6 @@ dependencies = [ "crc32fast", "criterion", "criterion-plot", - "crossbeam", "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", @@ -11305,7 +11271,6 @@ dependencies = [ "jemalloc-sys", "jobserver", "js-sys", - "json", "jsonrpsee", "jsonrpsee-client-transport", "jsonrpsee-core", @@ -11707,7 +11672,6 @@ dependencies = [ "tracing-appender", "tracing-attributes", "tracing-bunyan-formatter", - "tracing-chrome", "tracing-core", "tracing-futures", "tracing-log", diff --git a/crates/telemetry-subscribers/Cargo.toml b/crates/telemetry-subscribers/Cargo.toml index 1b2f233b4a5ea..598361424f5ba 100644 --- a/crates/telemetry-subscribers/Cargo.toml +++ b/crates/telemetry-subscribers/Cargo.toml @@ -19,16 +19,14 @@ tokio = { workspace = true, features = ["sync", "macros", "rt", "rt-multi-thread tracing = "0.1.37" tracing-appender = "0.2.2" tracing-bunyan-formatter = "0.3.3" -tracing-chrome = { version = "0.6.0", optional = true } tracing-opentelemetry = { version = "0.18.0", optional = true } tracing-subscriber = { version = "0.3.15", features = ["std", "time", "registry", "env-filter"] } workspace-hack = { version = "0.1", path = "../workspace-hack" } [features] -default = ["jaeger", "chrome"] +default = ["jaeger"] tokio-console = ["console-subscriber"] jaeger = ["tracing-opentelemetry", "opentelemetry", "opentelemetry-jaeger"] -chrome = ["tracing-chrome"] [dev-dependencies] camino = "1.0.9" diff --git a/crates/telemetry-subscribers/src/lib.rs b/crates/telemetry-subscribers/src/lib.rs index 5d51f14b75b43..fd8c658236724 100644 --- a/crates/telemetry-subscribers/src/lib.rs +++ b/crates/telemetry-subscribers/src/lib.rs @@ -141,8 +141,6 @@ pub struct TelemetryConfig { pub tokio_console: bool, /// Output JSON logs. pub json_log_output: bool, - /// Write chrome trace output, which can be loaded from chrome://tracing - pub chrome_trace_output: bool, /// If defined, write output to a file starting with this name, ex app.log pub log_file: Option, /// Log level to set, defaults to info @@ -162,9 +160,6 @@ pub struct TelemetryConfig { #[allow(dead_code)] pub struct TelemetryGuards { worker_guard: WorkerGuard, - - #[cfg(feature = "chrome")] - chrome_guard: Option, } #[derive(Clone, Debug)] @@ -240,7 +235,6 @@ impl TelemetryConfig { enable_jaeger: false, tokio_console: false, json_log_output: false, - chrome_trace_output: false, log_file: None, log_string: None, span_level: None, @@ -279,10 +273,6 @@ impl TelemetryConfig { self.enable_jaeger = true } - if env::var("TOKIO_CHROME").is_ok() { - self.chrome_trace_output = true; - } - if env::var("ENABLE_JSON_LOGS").is_ok() { self.json_log_output = true; } @@ -334,15 +324,6 @@ impl TelemetryConfig { layers.push(console_subscriber::spawn().boxed()); } - #[cfg(feature = "chrome")] - let chrome_guard = if config.chrome_trace_output { - let (chrome_layer, guard) = tracing_chrome::ChromeLayerBuilder::new().build(); - layers.push(chrome_layer.boxed()); - Some(guard) - } else { - None - }; - if let Some(registry) = config.prom_registry { let span_lat_layer = PrometheusSpanLatencyLayer::try_new(®istry, 15) .expect("Could not initialize span latency layer"); @@ -372,6 +353,13 @@ impl TelemetryConfig { let (nb_output, worker_guard) = get_output(config.log_file.clone()); if config.json_log_output { + // // Output to file or to stderr in a newline-delimited JSON format + // let json_layer = fmt::layer() + // .json() + // .with_writer(nb_output) + // .with_filter(log_filter) + // .boxed(); + // layers.push(json_layer); // See https://www.lpalmieri.com/posts/2020-09-27-zero-to-production-4-are-we-observable-yet/#5-7-tracing-bunyan-formatter // Also Bunyan layer adds JSON logging for tracing spans with duration information let json_layer = JsonStorageLayer @@ -401,8 +389,6 @@ impl TelemetryConfig { // gets flushed and closed. If this is dropped too early then no output will appear! let guards = TelemetryGuards { worker_guard, - #[cfg(feature = "chrome")] - chrome_guard, }; (guards, filter_handle) diff --git a/crates/workspace-hack/Cargo.toml b/crates/workspace-hack/Cargo.toml index 7d83e4c06ad98..b86ab677f2dac 100644 --- a/crates/workspace-hack/Cargo.toml +++ b/crates/workspace-hack/Cargo.toml @@ -136,7 +136,6 @@ crc-catalog = { version = "2", default-features = false } crc32fast = { version = "1" } criterion = { version = "0.4", features = ["async_tokio"] } criterion-plot = { version = "0.5", default-features = false } -crossbeam = { version = "0.8" } crossbeam-channel = { version = "0.5" } crossbeam-deque = { version = "0.8" } crossbeam-epoch = { version = "0.9", default-features = false, features = ["std"] } @@ -291,7 +290,6 @@ itertools = { version = "0.10" } itoa-9fbad63c4bcf4a8f = { package = "itoa", version = "0.4" } itoa-dff4ba8e3ae991db = { package = "itoa", version = "1", default-features = false } js-sys = { version = "0.3", default-features = false } -json = { version = "0.12", default-features = false } jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", default-features = false, features = ["full"] } jsonrpsee-client-transport = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", default-features = false, features = ["tls", "web", "ws"] } jsonrpsee-core = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", features = ["async-client", "async-wasm-client", "http-helpers", "server", "soketto"] } @@ -608,7 +606,6 @@ tower-service = { version = "0.3", default-features = false } tracing = { version = "0.1", features = ["log"] } tracing-appender = { version = "0.2", default-features = false } tracing-bunyan-formatter = { version = "0.3" } -tracing-chrome = { version = "0.6", default-features = false } tracing-core = { version = "0.1" } tracing-futures = { version = "0.2" } tracing-log = { version = "0.1" } @@ -809,7 +806,6 @@ crc-catalog = { version = "2", default-features = false } crc32fast = { version = "1" } criterion = { version = "0.4", features = ["async_tokio"] } criterion-plot = { version = "0.5", default-features = false } -crossbeam = { version = "0.8" } crossbeam-channel = { version = "0.5" } crossbeam-deque = { version = "0.8" } crossbeam-epoch = { version = "0.9", default-features = false, features = ["std"] } @@ -986,7 +982,6 @@ itoa-9fbad63c4bcf4a8f = { package = "itoa", version = "0.4" } itoa-dff4ba8e3ae991db = { package = "itoa", version = "1", default-features = false } jobserver = { version = "0.1", default-features = false } js-sys = { version = "0.3", default-features = false } -json = { version = "0.12", default-features = false } jsonrpsee = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", default-features = false, features = ["full"] } jsonrpsee-client-transport = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", default-features = false, features = ["tls", "web", "ws"] } jsonrpsee-core = { git = "https://github.com/patrickkuo/jsonrpsee.git", rev = "adc19a124ed7045744442ca67f084ddfba4ba177", features = ["async-client", "async-wasm-client", "http-helpers", "server", "soketto"] } @@ -1360,7 +1355,6 @@ tracing = { version = "0.1", features = ["log"] } tracing-appender = { version = "0.2", default-features = false } tracing-attributes = { version = "0.1", default-features = false } tracing-bunyan-formatter = { version = "0.3" } -tracing-chrome = { version = "0.6", default-features = false } tracing-core = { version = "0.1" } tracing-futures = { version = "0.2" } tracing-log = { version = "0.1" }