10 releases (6 breaking)

0.7.2 Mar 15, 2024
0.7.1 Feb 17, 2023
0.7.0 Nov 15, 2022
0.6.0 Apr 23, 2022
0.2.0 Sep 5, 2020

#25 in Debugging

Download history 69745/week @ 2024-07-17 54415/week @ 2024-07-24 67078/week @ 2024-07-31 69178/week @ 2024-08-07 78328/week @ 2024-08-14 65631/week @ 2024-08-21 58939/week @ 2024-08-28 64099/week @ 2024-09-04 62425/week @ 2024-09-11 59991/week @ 2024-09-18 62243/week @ 2024-09-25 69957/week @ 2024-10-02 68897/week @ 2024-10-09 65853/week @ 2024-10-16 66605/week @ 2024-10-23 68203/week @ 2024-10-30

285,565 downloads per month
Used in 105 crates (47 directly)

MIT license

24KB
459 lines

tracing-chrome

Crates.io Documentation GitHub CI

Overview

tracing-chrome is a Layer for tracing-subscriber that outputs traces in Chrome's trace viewer format that can be viewed with chrome://tracing or ui.perfetto.dev.

Usage

Add this near the beginning of main:

use tracing_chrome::ChromeLayerBuilder;
use tracing_subscriber::{registry::Registry, prelude::*};

let (chrome_layer, _guard) = ChromeLayerBuilder::new().build();
tracing_subscriber::registry().with(chrome_layer).init();

When _guard is dropped, your trace will be in a file like trace-1668480819035032.json.

Open that file with ui.perfetto.dev (or chrome://tracing) and take a look at your pretty trace.

License

Licensed under the MIT license

Contributions

Unless you state otherwise, any contribution intentionally submitted for inclusion in the work shall be licensed as above.

Dependencies

~1.4–2.2MB
~39K SLoC