Skip to content

Commit ca1d1ed

Browse files
committed
chore!: remove tracing-chrome feature
1 parent e9af851 commit ca1d1ed

File tree

7 files changed

+13
-55
lines changed

7 files changed

+13
-55
lines changed

AGENTS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,14 @@ lldb target/debugging/forest
357357

358358
## Cargo Features
359359

360-
- **`default`** - `jemalloc`, `tokio-console`, `tracing-loki`, `tracing-chrome`
360+
- **`default`** - `jemalloc`, `tracing-loki`
361361
- **`test`** - Default feature set for unit tests
362362
- **`slim`** - Minimal feature set (uses rustalloc)
363363
- **`jemalloc`** - Use jemalloc allocator (production default)
364364
- **`rustalloc`** - Use Rust standard allocator
365365
- **`system-alloc`** - Use system allocator (for memory profiling)
366366
- **`tokio-console`** - Enable tokio-console integration
367367
- **`tracing-loki`** - Send telemetry to Loki
368-
- **`tracing-chrome`** - Chrome tracing support
369368
- **`no-f3-sidecar`** - Disable F3 sidecar build
370369
- **`cargo-test`** - Group of tests that is recommended to run with `cargo test` instead of `nextest`
371370
- **`doctest-private`** - Enable doctests for private items

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
### Removed
3737

38+
- [#xxxx](xxx) 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.
39+
3840
### Fixed
3941

4042
## Forest v0.32.3 "Unimpressive Serenity"

Cargo.lock

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ zstd = "0.13"
230230
console-subscriber = { version = "0.5", features = ["parking_lot"], optional = true }
231231
sqlx = { version = "0.8", default-features = false, features = ["sqlite", "runtime-tokio", "macros"], optional = true }
232232
tikv-jemallocator = { version = "0.6", optional = true }
233-
tracing-chrome = { version = "0.7", optional = true }
234233
tracing-loki = { version = "0.2", default-features = false, features = ["compat-0-2-1", "rustls"], optional = true }
235234

236235
[target.'cfg(unix)'.dependencies]
@@ -320,13 +319,13 @@ lto = "fat"
320319

321320
# These should be refactored (probably removed) in #2984
322321
[features]
323-
default = ["jemalloc", "tracing-loki", "tracing-chrome", "sqlite"]
324-
test = [] # default feature set for unit tests
322+
default = ["jemalloc", "tracing-loki", "sqlite"]
323+
test = [] # default feature set for unit tests
325324
slim = ["rustalloc"]
326-
cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest`
327-
doctest-private = [] # see lib.rs::doctest_private
328-
benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private
329-
interop-tests-private = [] # see lib.rs::interop_tests_private
325+
cargo-test = [] # group of tests that is recommended to run with `cargo test` instead of `nextest`
326+
doctest-private = [] # see lib.rs::doctest_private
327+
benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private
328+
interop-tests-private = [] # see lib.rs::interop_tests_private
330329
sqlite = ["dep:sqlx"]
331330

332331
# Allocator. Use at most one of these.
@@ -336,7 +335,6 @@ system-alloc = [] # Use the platform allocator (for memory pr
336335

337336
tokio-console = ["dep:console-subscriber"]
338337
tracing-loki = ["dep:tracing-loki"]
339-
tracing-chrome = ["dep:tracing-chrome"]
340338

341339
no-f3-sidecar = []
342340

src/cli/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ where
2828

2929
let client = rpc::Client::default_or_from_env(token.as_deref())?;
3030

31-
let (_bg_tasks, _guards) = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default());
31+
let _bg_tasks = logger::setup_logger(&crate::cli_shared::cli::CliOpts::default());
3232

3333
cmd.run(client).await
3434
}

src/cli_shared/logger/mod.rs

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,9 @@ use crate::utils::misc::LoggingColor;
1111

1212
type BackgroundTask = Pin<Box<dyn Future<Output = ()> + Send>>;
1313

14-
#[derive(Default)]
15-
pub struct Guards {
16-
#[cfg(feature = "tracing-chrome")]
17-
tracing_chrome: Option<tracing_chrome::FlushGuard>,
18-
}
19-
2014
#[allow(unused_mut)]
21-
pub fn setup_logger(opts: &CliOpts) -> (Vec<BackgroundTask>, Guards) {
15+
pub fn setup_logger(opts: &CliOpts) -> Vec<BackgroundTask> {
2216
let mut background_tasks: Vec<BackgroundTask> = vec![];
23-
let mut guards = Guards::default();
2417
let mut layers: Vec<Box<dyn tracing_subscriber::layer::Layer<Registry> + Send + Sync>> =
2518
// console logger
2619
vec![Box::new(
@@ -88,30 +81,8 @@ pub fn setup_logger(opts: &CliOpts) -> (Vec<BackgroundTask>, Guards) {
8881
}
8982
}
9083

91-
// Go to <https://ui.perfetto.dev> to browse trace files.
92-
// You may want to call ChromeLayerBuilder::trace_style as appropriate
93-
if let Some(_chrome_trace_file) = std::env::var_os("CHROME_TRACE_FILE") {
94-
#[cfg(not(feature = "tracing-chrome"))]
95-
tracing::warn!(
96-
"`tracing-chrome` is unavailable, forest binaries need to be recompiled with `tracing-chrome` feature"
97-
);
98-
99-
#[cfg(feature = "tracing-chrome")]
100-
{
101-
let (layer, guard) = match _chrome_trace_file.is_empty() {
102-
true => tracing_chrome::ChromeLayerBuilder::new().build(),
103-
false => tracing_chrome::ChromeLayerBuilder::new()
104-
.file(_chrome_trace_file)
105-
.build(),
106-
};
107-
108-
guards.tracing_chrome = Some(guard);
109-
layers.push(Box::new(layer));
110-
}
111-
}
112-
11384
tracing_subscriber::registry().with(layers).init();
114-
(background_tasks, guards)
85+
background_tasks
11586
}
11687

11788
// Log warnings to stderr

src/daemon/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ where
3535
// Run forest as a daemon if no other subcommands are used. Otherwise, run the
3636
// subcommand.
3737

38-
let (background_tasks, _guards) = logger::setup_logger(&opts);
38+
let background_tasks = logger::setup_logger(&opts);
3939

4040
if let Some(path) = &path {
4141
match path {

0 commit comments

Comments
 (0)