diff --git a/AGENTS.md b/AGENTS.md index 95fe74ab2e2b..468fe3f65c8f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -355,23 +355,6 @@ lldb target/debugging/forest - `FULLNODE_API_INFO` - RPC endpoint and authentication token - `FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT` - Disable F3 sidecar build (for debugging profile) -## Cargo Features - -- **`default`** - `jemalloc`, `tokio-console`, `tracing-loki`, `tracing-chrome` -- **`test`** - Default feature set for unit tests -- **`slim`** - Minimal feature set (uses rustalloc) -- **`jemalloc`** - Use jemalloc allocator (production default) -- **`rustalloc`** - Use Rust standard allocator -- **`system-alloc`** - Use system allocator (for memory profiling) -- **`tokio-console`** - Enable tokio-console integration -- **`tracing-loki`** - Send telemetry to Loki -- **`tracing-chrome`** - Chrome tracing support -- **`no-f3-sidecar`** - Disable F3 sidecar build -- **`cargo-test`** - Group of tests that is recommended to run with `cargo test` instead of `nextest` -- **`doctest-private`** - Enable doctests for private items -- **`benchmark-private`** - Enable benchmark suite -- **`interop-tests-private`** - Enable interop tests - ## Build Profiles - **`dev`** - Fast compile, line-table-only debug info, opt-level=1 for deps diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ee2f33d512f..08b7304df76b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ ### Breaking -- [#6680](https://github.com/ChainSafe/forest/pull/6680) Made the `tokio-console` feature optional and disabled by default. Users relying on this feature must now explicitly compile Forest with `--features tokio-console` to enable it. +- [#6680](https://github.com/ChainSafe/forest/pull/6680): Made the `tokio-console` feature optional and disabled by default. Users relying on this feature must now explicitly compile Forest with `--features tokio-console` to enable it. ### Added @@ -35,6 +35,8 @@ ### Removed +- [#6681](https://github.com/ChainSafe/forest/pull/6681): Removed `tracing-chrome` feature and all related code as it was deemed unused. If you didn't set `CHROME_TRACE_FILE` manually before, you shouldn't be affected by this change. If you were using this feature, reach out. + ### Fixed ## Forest v0.32.3 "Unimpressive Serenity" diff --git a/Cargo.lock b/Cargo.lock index 42f5716ee941..d27c9cb97d86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3421,7 +3421,6 @@ dependencies = [ "tower-http", "tracing", "tracing-appender", - "tracing-chrome", "tracing-loki", "tracing-subscriber", "unsigned-varint 0.8.0", @@ -10127,17 +10126,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "tracing-chrome" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" -dependencies = [ - "serde_json", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-core" version = "0.1.36" diff --git a/Cargo.toml b/Cargo.toml index 64736882bbc7..a4e61758507e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -231,7 +231,6 @@ zstd = "0.13" console-subscriber = { version = "0.5", features = ["parking_lot"], optional = true } sqlx = { version = "0.8", default-features = false, features = ["sqlite", "runtime-tokio", "macros"], optional = true } tikv-jemallocator = { version = "0.6", optional = true } -tracing-chrome = { version = "0.7", optional = true } tracing-loki = { version = "0.2", default-features = false, features = ["compat-0-2-1", "rustls"], optional = true } [target.'cfg(unix)'.dependencies] @@ -321,13 +320,13 @@ lto = "fat" # These should be refactored (probably removed) in #2984 [features] -default = ["jemalloc", "tracing-loki", "tracing-chrome", "sqlite"] -test = [] # default feature set for unit tests +default = ["jemalloc", "tracing-loki", "sqlite"] +test = [] # default feature set for unit tests slim = ["rustalloc"] -cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest` -doctest-private = [] # see lib.rs::doctest_private -benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private -interop-tests-private = [] # see lib.rs::interop_tests_private +cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest` +doctest-private = [] # see lib.rs::doctest_private +benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private +interop-tests-private = [] # see lib.rs::interop_tests_private sqlite = ["dep:sqlx"] # Allocator. Use at most one of these. @@ -337,7 +336,6 @@ system-alloc = [] # Use the platform allocator (for memory pr tokio-console = ["dep:console-subscriber"] tracing-loki = ["dep:tracing-loki"] -tracing-chrome = ["dep:tracing-chrome"] no-f3-sidecar = [] diff --git a/src/cli/main.rs b/src/cli/main.rs index b46831dd235e..62c8fc00b0cd 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -28,7 +28,7 @@ where let client = rpc::Client::default_or_from_env(token.as_deref())?; - let (_bg_tasks, _guards) = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default()); + let _bg_tasks = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default()); cmd.run(client).await } diff --git a/src/cli_shared/logger/mod.rs b/src/cli_shared/logger/mod.rs index d21f705821fc..41283e336cc1 100644 --- a/src/cli_shared/logger/mod.rs +++ b/src/cli_shared/logger/mod.rs @@ -11,16 +11,9 @@ use crate::utils::misc::LoggingColor; type BackgroundTask = Pin + Send>>; -#[derive(Default)] -pub struct Guards { - #[cfg(feature = "tracing-chrome")] - tracing_chrome: Option, -} - #[allow(unused_mut)] -pub fn setup_logger(opts: &CliOpts) -> (Vec, Guards) { +pub fn setup_logger(opts: &CliOpts) -> Vec { let mut background_tasks: Vec = vec![]; - let mut guards = Guards::default(); let mut layers: Vec + Send + Sync>> = // console logger vec![Box::new( @@ -88,30 +81,8 @@ pub fn setup_logger(opts: &CliOpts) -> (Vec, Guards) { } } - // Go to to browse trace files. - // You may want to call ChromeLayerBuilder::trace_style as appropriate - if let Some(_chrome_trace_file) = std::env::var_os("CHROME_TRACE_FILE") { - #[cfg(not(feature = "tracing-chrome"))] - tracing::warn!( - "`tracing-chrome` is unavailable, forest binaries need to be recompiled with `tracing-chrome` feature" - ); - - #[cfg(feature = "tracing-chrome")] - { - let (layer, guard) = match _chrome_trace_file.is_empty() { - true => tracing_chrome::ChromeLayerBuilder::new().build(), - false => tracing_chrome::ChromeLayerBuilder::new() - .file(_chrome_trace_file) - .build(), - }; - - guards.tracing_chrome = Some(guard); - layers.push(Box::new(layer)); - } - } - tracing_subscriber::registry().with(layers).init(); - (background_tasks, guards) + background_tasks } // Log warnings to stderr diff --git a/src/daemon/main.rs b/src/daemon/main.rs index c08ed0798e01..c6cdacebe790 100644 --- a/src/daemon/main.rs +++ b/src/daemon/main.rs @@ -35,7 +35,7 @@ where // Run forest as a daemon if no other subcommands are used. Otherwise, run the // subcommand. - let (background_tasks, _guards) = logger::setup_logger(&opts); + let background_tasks = logger::setup_logger(&opts); if let Some(path) = &path { match path {