Skip to content

Commit cfab8bf

Browse files
WorldSEnderhawkw
authored andcommitted
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 14cfe55 commit cfab8bf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ are not maintained by the `tokio` project. These include:
390390
_inside_ of functions.
391391
- [`tracing-wasm`] provides a `Subscriber`/`Layer` implementation that reports
392392
events and spans via browser `console.log` and [User Timing API (`window.performance`)].
393+
- [`tracing-web`] provides a layer implementation of level-aware logging of events
394+
to web browsers' `console.*` and span events to the [User Timing API (`window.performance`)].
393395
- [`test-log`] takes care of initializing `tracing` for tests, based on
394396
environment variables with an `env_logger` compatible syntax.
395397
- [`tracing-unwrap`] provides convenience methods to report failed unwraps on `Result` or `Option` types to a `Subscriber`.
@@ -425,6 +427,7 @@ please let us know!)
425427
[`color-eyre`]: https://docs.rs/color-eyre
426428
[`spandoc`]: https://docs.rs/spandoc
427429
[`tracing-wasm`]: https://docs.rs/tracing-wasm
430+
[`tracing-web`]: https://crates.io/crates/tracing-web
428431
[`test-log`]: https://crates.io/crates/test-log
429432
[User Timing API (`window.performance`)]: https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API
430433
[`tracing-unwrap`]: https://docs.rs/tracing-unwrap

tracing/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@
727727
//! in [bunyan] format, enriched with timing information.
728728
//! - [`tracing-wasm`] provides a `Subscriber`/`Layer` implementation that reports
729729
//! events and spans via browser `console.log` and [User Timing API (`window.performance`)].
730+
//! - [`tracing-web`] provides a layer implementation of level-aware logging of events
731+
//! to web browsers' `console.*` and span events to the [User Timing API (`window.performance`)].
730732
//! - [`tide-tracing`] provides a [tide] middleware to trace all incoming requests and responses.
731733
//! - [`test-log`] takes care of initializing `tracing` for tests, based on
732734
//! environment variables with an `env_logger` compatible syntax.
@@ -761,6 +763,7 @@
761763
//! [`tracing-bunyan-formatter`]: https://crates.io/crates/tracing-bunyan-formatter
762764
//! [bunyan]: https://github.com/trentm/node-bunyan
763765
//! [`tracing-wasm`]: https://docs.rs/tracing-wasm
766+
//! [`tracing-web`]: https://docs.rs/tracing-web
764767
//! [User Timing API (`window.performance`)]: https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API
765768
//! [`tide-tracing`]: https://crates.io/crates/tide-tracing
766769
//! [tide]: https://crates.io/crates/tide

0 commit comments

Comments
 (0)