Registry / observability / tracing-chrome

tracing-chrome

JSON →
library0.7.2rscratesunverified

A Layer for tracing-subscriber that outputs Chrome-style traces, enabling performance profiling in Chrome DevTools.

# Cargo.toml [dependencies] tracing-chrome = "0.7.2"
INSTALL
IMPORT
SIG · TRACING-CHROME
T
tracing-chrome
observabilityrustv0.7.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChromeLayerBuilder
use tracing_chrome::ChromeLayerBuilder;

Initializes a Chrome tracing layer and logs an info event.

use tracing_chrome::ChromeLayerBuilder; use tracing_subscriber::prelude::*; fn main() { let (chrome_layer, _guard) = ChromeLayerBuilder::new().build(); tracing_subscriber::registry().with(chrome_layer).init(); tracing::info!("Hello, Chrome trace!"); }
Debug
Known issues
gotchaThe guard must be kept alive for the duration of tracing; dropping it stops the trace.
fix
Store the guard in a variable with a long enough lifetime, e.g., let _guard = ...;
affects: >=0.7.0
Upgrade
Version history
0.7.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
18
OpenAI (training)
1
Resources
tracing-chrome — cargo add tracing-chrome · libregistry