13 releases

new 0.2.0 Dec 6, 2021
0.1.11 Nov 22, 2021
0.1.10 Sep 6, 2021
0.1.9 Mar 9, 2021
0.1.4 Jul 13, 2020
Download history 8419/week @ 2021-08-16 8654/week @ 2021-08-23 8173/week @ 2021-08-30 8268/week @ 2021-09-06 9974/week @ 2021-09-13 9651/week @ 2021-09-20 10186/week @ 2021-09-27 10871/week @ 2021-10-04 10032/week @ 2021-10-11 9982/week @ 2021-10-18 9580/week @ 2021-10-25 11681/week @ 2021-11-01 11549/week @ 2021-11-08 11038/week @ 2021-11-15 11025/week @ 2021-11-22 9553/week @ 2021-11-29

44,733 downloads per month
Used in 7 crates (4 directly)

MIT/Apache

28KB
698 lines

tracing-tree

Instrument your application with tracing and get tree-structured summaries of your application activity with timing information on the console:

 
 server{host="localhost", port=8080}
    0ms  INFO starting
    300ms  INFO listening
    conn{peer_addr="82.9.9.9", port=42381}
      0ms DEBUG connected
      300ms DEBUG message received, length=2
    conn{peer_addr="8.8.8.8", port=18230}
      300ms DEBUG connected
    conn{peer_addr="82.9.9.9", port=42381}
      600ms  WARN weak encryption requested, algo="xor"
      901ms DEBUG response sent, length=8
      901ms DEBUG disconnected
    conn{peer_addr="8.8.8.8", port=18230}
      600ms DEBUG message received, length=5
      901ms DEBUG response sent, length=8
      901ms DEBUG disconnected
    1502ms  WARN internal error
    1502ms  INFO exit

(Format inspired by slog-term)

Setup

After instrumenting your app with tracing, add this subscriber like this:

let subscriber = Registry::default().with(HierarchicalLayer::new(2));
tracing::subscriber::set_global_default(subscriber).unwrap();

Dependencies

~1.5MB
~22K SLoC