Skip to content

Commit 3517552

Browse files
authored
tracing: add tracing-web to the list of related crates (#2283)
Fixes #2280 ## Motivation I've implemented an alternative to [`tracing-wasm`] to fix some issues that I had when using it (most are open as longer time bug reports, no need to recount them here). It should be more up to date with the current tracing framework and, being layer based, is easier to compose with other subscribers, e.g. supports formatting and timing on event logs out of the box. ## Solution Add the [`tracing-web`] crate to the list of related crates. [`tracing-wasm`]: (https://github.com/storyai/tracing-wasm) [`tracing-web`]: https://crates.io/crates/tracing-web/
1 parent 370a7c1 commit 3517552

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ are not maintained by the `tokio` project. These include:
392392
_inside_ of functions.
393393
- [`tracing-wasm`] provides a `Collector`/`Subscriber` implementation that reports
394394
events and spans via browser `console.log` and [User Timing API (`window.performance`)].
395+
- [`tracing-web`] provides a layer implementation of level-aware logging of events
396+
to web browsers' `console.*` and span events to the [User Timing API (`window.performance`)].
395397
- [`test-log`] takes care of initializing `tracing` for tests, based on
396398
environment variables with an `env_logger` compatible syntax.
397399
- [`tracing-unwrap`] provides convenience methods to report failed unwraps on `Result` or `Option` types to a `Collector`.
@@ -427,6 +429,7 @@ please let us know!)
427429
[`color-eyre`]: https://docs.rs/color-eyre
428430
[`spandoc`]: https://docs.rs/spandoc
429431
[`tracing-wasm`]: https://docs.rs/tracing-wasm
432+
[`tracing-web`]: https://crates.io/crates/tracing-web
430433
[`test-log`]: https://crates.io/crates/test-log
431434
[User Timing API (`window.performance`)]: https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API
432435
[`tracing-unwrap`]: https://docs.rs/tracing-unwrap

tracing/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@
788788
//! in [bunyan] format, enriched with timing information.
789789
//! - [`tracing-wasm`] provides a `Collect`/`Subscribe` implementation that reports
790790
//! events and spans via browser `console.log` and [User Timing API (`window.performance`)].
791+
//! - [`tracing-web`] provides a layer implementation of level-aware logging of events
792+
//! to web browsers' `console.*` and span events to the [User Timing API (`window.performance`)].
791793
//! - [`tide-tracing`] provides a [tide] middleware to trace all incoming requests and responses.
792794
//! - [`test-log`] takes care of initializing `tracing` for tests, based on
793795
//! environment variables with an `env_logger` compatible syntax.
@@ -822,6 +824,7 @@
822824
//! [`tracing-bunyan-formatter`]: https://crates.io/crates/tracing-bunyan-formatter
823825
//! [bunyan]: https://github.com/trentm/node-bunyan
824826
//! [`tracing-wasm`]: https://docs.rs/tracing-wasm
827+
//! [`tracing-web`]: https://docs.rs/tracing-web
825828
//! [User Timing API (`window.performance`)]: https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API
826829
//! [`tide-tracing`]: https://crates.io/crates/tide-tracing
827830
//! [tide]: https://crates.io/crates/tide

0 commit comments

Comments
 (0)