Skip to content

Commit d37a783

Browse files
authored
Merge branch 'master' into master
2 parents 6695150 + e66e6d9 commit d37a783

File tree

147 files changed

+3449
-1132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3449
-1132
lines changed

.github/workflows/CI.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
shell: bash
122122

123123
check-msrv:
124-
# Run `cargo check` on our minimum supported Rust version (1.63.0). This
124+
# Run `cargo check` on our minimum supported Rust version (1.65.0). This
125125
# checks with minimal versions; maximal versions are checked above.
126126
name: "cargo check (+MSRV -Zminimal-versions)"
127127
needs: check
@@ -143,7 +143,7 @@ jobs:
143143
- tracing-tower
144144
- tracing
145145
toolchain:
146-
- 1.63.0
146+
- 1.65.0
147147
- stable
148148
steps:
149149
- uses: actions/checkout@v4
@@ -189,6 +189,30 @@ jobs:
189189
esac
190190
shell: bash
191191

192+
check-portable-atomic:
193+
# Run `cargo check` on platforms without full atomic support
194+
name: cargo check (${{ matrix.target }} with portable-atomic)
195+
needs: check
196+
strategy:
197+
matrix:
198+
target: ["thumbv6m-none-eabi"]
199+
runs-on: ubuntu-latest
200+
steps:
201+
- uses: actions/checkout@v4
202+
- uses: dtolnay/rust-toolchain@stable
203+
with:
204+
targets: ${{ matrix.target }}
205+
- name: Check tracing-core
206+
run: cargo check --target ${{ matrix.target }} -p tracing-core --no-default-features --features alloc,portable-atomic,critical-section
207+
- name: Check tracing-serde
208+
run: cargo check --target ${{ matrix.target }} -p tracing-serde --no-default-features --features portable-atomic,critical-section
209+
- name: Check tracing
210+
run: cargo check --target ${{ matrix.target }} -p tracing --no-default-features --features attributes,portable-atomic,critical-section
211+
- name: Check tracing-subscriber
212+
run: cargo check --target ${{ matrix.target }} -p tracing-subscriber --no-default-features --features alloc,portable-atomic,critical-section
213+
- name: Check tracing-futures
214+
run: cargo check --target ${{ matrix.target }} -p tracing-futures --no-default-features --features portable-atomic,critical-section
215+
192216
### test jobs #############################################################
193217

194218
test:
@@ -269,8 +293,10 @@ jobs:
269293
- tracing
270294
steps:
271295
- uses: actions/checkout@v4
272-
- uses: dtolnay/rust-toolchain@stable
296+
- name: Install Rust 1.81
297+
uses: dtolnay/rust-toolchain@stable
273298
with:
299+
toolchain: 1.81
274300
target: wasm32-unknown-unknown
275301
- name: install test runner for wasm
276302
uses: taiki-e/install-action@wasm-pack

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ be viewed by clicking the `details` link on the
214214
### Building Documentation
215215

216216
Tracing's documentation uses nightly-only RustDoc features and lints, like
217-
`doc(cfg)` and `broken_intra_doc_lints`. These features are enabled by
217+
`doc(cfg)` and `broken_intra_doc_lints`. These features are enabled by
218218
passing `--cfg docsrs` to RustDoc. Therefore, in order to build Tracing's
219219
documentation the same way it would be built by docs.rs, it's necessary to
220220
use the following command:
@@ -430,8 +430,7 @@ When releasing a new version of a crate, follow these steps:
430430
2. **Update Cargo metadata.** After releasing any path dependencies, update the
431431
`version` field in `Cargo.toml` to the new version, and the `documentation`
432432
field to the docs.rs URL of the new version.
433-
3. **Update other documentation links.** Update the `#![doc(html_root_url)]`
434-
attribute in the crate's `lib.rs` and the "Documentation" link in the crate's
433+
3. **Update the "Documentation" link in the crate's
435434
`README.md` to point to the docs.rs URL of the new version.
436435
4. **Update the changelog for the crate.** Each crate in the Tokio repository
437436
has its own `CHANGELOG.md` in that crate's subdirectory. Any changes to that

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ members = [
1818
"tracing-journald",
1919
"examples"
2020
]
21+
22+
# This will be ignored with Rust older than 1.74, but for now that's okay;
23+
# we're only using it to fix check-cfg issues that first appeared in Rust 1.80.
24+
[workspace.lints.rust]
25+
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(flaky_tests)", "cfg(tracing_unstable)"] }

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[docs-badge]: https://docs.rs/tracing/badge.svg
1515
[docs-url]: https://docs.rs/tracing
1616
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
17-
[docs-master-url]: https://tracing-rs.netlify.com
17+
[docs-master-url]: https://tracing.rs
1818
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
1919
[mit-url]: LICENSE
2020
[actions-badge]: https://github.com/tokio-rs/tracing/workflows/CI/badge.svg
@@ -254,7 +254,7 @@ attachment that `Future::instrument` does.
254254
## Supported Rust Versions
255255

256256
Tracing is built against the latest stable release. The minimum supported
257-
version is 1.63. The current Tracing version is not guaranteed to build on Rust
257+
version is 1.65. The current Tracing version is not guaranteed to build on Rust
258258
versions earlier than the minimum supported version.
259259

260260
Tracing follows the same compiler support policies as the rest of the Tokio
@@ -398,7 +398,7 @@ are not maintained by the `tokio` project. These include:
398398
- [`tracing-elastic-apm`] provides a layer for reporting traces to [Elastic APM].
399399
- [`tracing-etw`] provides a layer for emitting Windows [ETW] events.
400400
- [`sentry-tracing`] provides a layer for reporting events and traces to [Sentry].
401-
- [`tracing-forest`] provides a subscriber that preserves contextual coherence by
401+
- [`tracing-forest`] provides a subscriber that preserves contextual coherence by
402402
grouping together logs from the same spans during writing.
403403
- [`tracing-loki`] provides a layer for shipping logs to [Grafana Loki].
404404
- [`tracing-logfmt`] provides a layer that formats events and spans into the logfmt format.
@@ -477,6 +477,7 @@ Tracing.
477477
* [RustConf 2019 talk][rust-conf-2019-08-video] and [slides][rust-conf-2019-08-slides], August 2019
478478
* [Are we observable yet? @ RustyDays talk][rusty-days-2020-08-video] and [slides][rusty-days-2020-08-slides], August 2020
479479
* [Crabs with instruments!][tremorcon-2021-09], September 2021
480+
* [Decrusting the tracing crate by Jon Gjengset][decrusting-tracing-2024-02], February 2024
480481

481482
[bay-rust-2019-03]: https://www.youtube.com/watch?v=j_kXRg3zlec
482483
[rust-conf-2019-08-video]: https://www.youtube.com/watch?v=JjItsfqFIdo
@@ -487,6 +488,7 @@ Tracing.
487488
[custom-logging-part-1]: https://burgers.io/custom-logging-in-rust-using-tracing
488489
[custom-logging-part-2]: https://burgers.io/custom-logging-in-rust-using-tracing-part-2
489490
[tremorcon-2021-09]: https://www.youtube.com/watch?v=ZC7fyqshun8
491+
[decrusting-tracing-2024-02]: https://www.youtube.com/watch?v=21rtHinFA40
490492

491493
Help us expand this list! If you've written or spoken about Tracing, or
492494
know of resources that aren't listed, please open a pull request adding them.

examples/Cargo.toml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ name = "tracing-examples"
33
version = "0.0.0"
44
publish = false
55
edition = "2018"
6-
rust-version = "1.63.0"
6+
rust-version = "1.64.0"
77

88
[features]
99
default = []
1010

1111
[dev-dependencies]
1212

1313
# tracing crates
14-
tracing = { path = "../tracing", version = "0.2"}
15-
tracing-core = { path = "../tracing-core", version = "0.2"}
14+
tracing = { path = "../tracing", version = "0.2" }
15+
tracing-core = { path = "../tracing-core", version = "0.2" }
1616
tracing-error = { path = "../tracing-error" }
1717
tracing-flame = { path = "../tracing-flame" }
1818
tracing-tower = { version = "0.1.0", path = "../tracing-tower" }
1919
tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", features = ["json", "env-filter"] }
2020
tracing-futures = { version = "0.3", path = "../tracing-futures", features = ["futures-01"] }
21-
tracing-attributes = { path = "../tracing-attributes", version = "0.2"}
21+
tracing-attributes = { path = "../tracing-attributes", version = "0.2" }
2222
tracing-log = { path = "../tracing-log", version = "0.2", features = ["env_logger"] }
2323
tracing-serde = { path = "../tracing-serde" }
2424
tracing-appender = { path = "../tracing-appender" }
@@ -50,3 +50,12 @@ tempfile = "3.3.0"
5050
# fmt examples
5151
snafu = "0.6.10"
5252
thiserror = "1.0.31"
53+
54+
# env-filter-explorer example
55+
ansi-to-tui = "7.0.0"
56+
ratatui = "0.29.0"
57+
crossterm = "0.28.1"
58+
tui-textarea = "0.7.0"
59+
60+
[lints]
61+
workspace = true

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ This directory contains a collection of examples that demonstrate the use of the
4646
+ `futures-proxy-server`: Demonstrates the use of `tracing-futures` by
4747
implementing a simple proxy server, based on [this example][tokio-proxy]
4848
from `tokio`.
49-
+ `async_fn`: Demonstrates how asynchronous functions can be
49+
+ `async-fn`: Demonstrates how asynchronous functions can be
5050
instrumented.
5151
+ `echo`: Demonstrates a `tracing`-instrumented variant of Tokio's `echo` example.
5252
- **tracing-flame**:
53-
+ `infero-flame`: Demonstrates the use of `tracing-flame` to generate a flamegraph
53+
+ `inferno-flame`: Demonstrates the use of `tracing-flame` to generate a flamegraph
5454
from spans.
5555
- **tracing-tower**:
5656
+ `tower-client`: Demonstrates the use of `tracing-tower` to instrument a

examples/examples/all-levels.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! NOTE: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem. For the
2+
//! release examples, please see the `v0.1.x` branch instead.
13
use tracing::Level;
24

35
#[no_mangle]

examples/examples/appender-multifile.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
//! NOTE: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem. For the
2+
//! release examples, please see the `v0.1.x` branch instead.
3+
//!
14
//! This example demonstrates the use of multiple files with
25
//! `tracing-appender`'s `RollingFileAppender`
3-
//!
46
use tracing_appender::rolling;
57
use tracing_subscriber::fmt::writer::MakeWriterExt;
68

examples/examples/async-fn.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! NOTE: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem. For the
2+
//! release examples, please see the `v0.1.x` branch instead.
3+
//!
14
//! Demonstrates using the `trace` attribute macro to instrument `async`
25
//! functions.
36
//!

examples/examples/attrs-args.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! NOTE: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem. For the
2+
//! release examples, please see the `v0.1.x` branch instead.
13
#![deny(rust_2018_idioms)]
24

35
use tracing::{debug, info};

0 commit comments

Comments
 (0)