Skip to content

Commit 23cc2cb

Browse files
committed
Merge remote-tracking branch 'origin/master' into hds/mock-docs-expect
2 parents dfa827b + 21c5ce0 commit 23cc2cb

File tree

185 files changed

+6156
-5192
lines changed

Some content is hidden

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

185 files changed

+6156
-5192
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@
1111
# David contributed the Registry implementation.
1212
/tracing-subscriber/registry @davidbarsky @hawkw @tokio-rs/tracing
1313

14-
# Julian contributed the OpenTelemetry implementation.
15-
/tracing-opentelemetry/ @jtescher @tokio-rs/tracing
16-
1714
# Zeki contributed the TracingAppender implementation
1815
/tracing-appender/ @zekisherif @tokio-rs/tracing

.github/workflows/CI.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
name: cargo check
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- uses: dtolnay/rust-toolchain@stable
4040
- name: Check
4141
run: cargo check --all --tests --benches
@@ -46,7 +46,7 @@ jobs:
4646
needs: check
4747
runs-on: ubuntu-latest
4848
steps:
49-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
5050
- uses: dtolnay/rust-toolchain@stable
5151
with:
5252
components: rustfmt
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: ubuntu-latest
5959
needs: check
6060
steps:
61-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
6262
- uses: dtolnay/rust-toolchain@stable
6363
with:
6464
components: clippy
@@ -85,13 +85,11 @@ jobs:
8585
- tracing-macros
8686
- tracing-serde
8787
- tracing-tower
88-
- tracing-opentelemetry
8988
- tracing
9089
- tracing-subscriber
9190
steps:
92-
- uses: actions/checkout@v3
91+
- uses: actions/checkout@v4
9392
- uses: dtolnay/rust-toolchain@stable
94-
9593
- name: install cargo-hack
9694
uses: taiki-e/install-action@cargo-hack
9795
- name: cargo hack check
@@ -123,7 +121,7 @@ jobs:
123121
shell: bash
124122

125123
check-msrv:
126-
# Run `cargo check` on our minimum supported Rust version (1.49.0). This
124+
# Run `cargo check` on our minimum supported Rust version (1.63.0). This
127125
# checks with minimal versions; maximal versions are checked above.
128126
name: "cargo check (+MSRV -Zminimal-versions)"
129127
needs: check
@@ -143,29 +141,12 @@ jobs:
143141
- tracing-serde
144142
- tracing-subscriber
145143
- tracing-tower
146-
- tracing-opentelemetry
147144
- tracing
148145
toolchain:
149-
- 1.49.0
146+
- 1.63.0
150147
- stable
151-
# TODO(eliza): remove this when appender is on the same MSRV.
152-
# same for tracing subscriber
153-
exclude:
154-
- subcrate: tracing-appender
155-
toolchain: 1.49.0
156-
- subcrate: tracing-subscriber
157-
toolchain: 1.49.0
158-
- subcrate: tracing-opentelemetry
159-
toolchain: 1.49.0
160-
include:
161-
- subcrate: tracing-appender
162-
toolchain: 1.53.0
163-
- subcrate: tracing-subscriber
164-
toolchain: 1.50.0
165-
- subcrate: tracing-opentelemetry
166-
toolchain: 1.56.0
167148
steps:
168-
- uses: actions/checkout@v3
149+
- uses: actions/checkout@v4
169150
- name: install Rust nightly
170151
uses: dtolnay/rust-toolchain@nightly
171152
- name: "install Rust ${{ matrix.toolchain }}"
@@ -229,7 +210,7 @@ jobs:
229210
fail-fast: false
230211
runs-on: ${{ matrix.os }}
231212
steps:
232-
- uses: actions/checkout@v3
213+
- uses: actions/checkout@v4
233214
- name: "install Rust ${{ matrix.rust }}"
234215
uses: dtolnay/rust-toolchain@master
235216
with:
@@ -266,13 +247,12 @@ jobs:
266247
- tracing-journald
267248
- tracing-log
268249
- tracing-macros
269-
- tracing-opentelemetry
270250
- tracing-serde
271251
- tracing-subscriber
272252
- tracing-tower
273253
fail-fast: false
274254
steps:
275-
- uses: actions/checkout@v3
255+
- uses: actions/checkout@v4
276256
- uses: dtolnay/rust-toolchain@stable
277257
with:
278258
target: wasm32-unknown-unknown
@@ -288,9 +268,11 @@ jobs:
288268
subcrate:
289269
- tracing
290270
steps:
291-
- uses: actions/checkout@v3
292-
- uses: dtolnay/rust-toolchain@stable
271+
- uses: actions/checkout@v4
272+
- name: Install Rust 1.81
273+
uses: dtolnay/rust-toolchain@stable
293274
with:
275+
toolchain: 1.81
294276
target: wasm32-unknown-unknown
295277
- name: install test runner for wasm
296278
uses: taiki-e/install-action@wasm-pack
@@ -299,35 +281,26 @@ jobs:
299281

300282
test-features-stable:
301283
# Feature flag tests that run on stable Rust.
302-
# TODO(david): once tracing's MSRV goes up to Rust 1.51, we should be able to switch to
303-
# using cargo's V2 feature resolver (https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions)
304-
# and avoid cd'ing into each crate's directory.
305284
name: cargo test (feature-specific)
306285
needs: check
307286
runs-on: ubuntu-latest
308287
steps:
309-
- uses: actions/checkout@v3
288+
- uses: actions/checkout@v4
310289
- uses: dtolnay/rust-toolchain@stable
311290
- name: "Test log support"
312291
run: cargo test
313-
working-directory: "tracing/test-log-support"
314292
- name: "Test static max level"
315293
run: cargo test
316-
working-directory: "tracing/test_static_max_level_features"
317294
- name: "Test static max level (release)"
318295
run: cargo test --release
319-
working-directory: "tracing/test_static_max_level_features"
320296
- name: "Test tracing-core no-std support"
321297
run: cargo test --no-default-features
322-
working-directory: tracing
323298
- name: "Test tracing no-std support"
324299
run: cargo test --no-default-features
325-
working-directory: tracing
326300
# this skips running doctests under the `--no-default-features` flag,
327301
# as rustdoc isn't aware of cargo's feature flags.
328302
- name: "Test tracing-subscriber with all features disabled"
329303
run: cargo test --lib --tests --no-default-features
330-
working-directory: tracing-subscriber
331304

332305
# all required checks except for the main test run (which we only require
333306
# specific matrix combinations from)

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
security_audit:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
- uses: actions-rs/audit-check@v1
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: github.repository_owner == 'tokio-rs'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- uses: taiki-e/create-gh-release-action@v1
1818
with:
1919
prefix: tracing(-[a-z]+)?

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
2+
resolver = "2"
33
members = [
44
"tracing",
55
"tracing-core",
@@ -11,10 +11,15 @@ members = [
1111
"tracing-log",
1212
"tracing-macros",
1313
"tracing-mock",
14-
"tracing-opentelemetry",
1514
"tracing-subscriber",
1615
"tracing-serde",
16+
"tracing-test",
1717
"tracing-appender",
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: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ 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.49. The current Tracing version is not guaranteed to build on Rust
257+
version is 1.63. 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
261261
project. The current stable Rust compiler and the three most recent minor
262262
versions before it will always be supported. For example, if the current stable
263-
compiler version is 1.45, the minimum supported version will not be increased
264-
past 1.42, three minor versions prior. Increasing the minimum supported compiler
263+
compiler version is 1.69, the minimum supported version will not be increased
264+
past 1.66, three minor versions prior. Increasing the minimum supported compiler
265265
version is not considered a semver breaking change as long as doing so complies
266266
with this policy.
267267

@@ -307,11 +307,6 @@ The crates included as part of Tracing are:
307307

308308
* [`tracing-log`]: Compatibility with the `log` crate (unstable).
309309

310-
* [`tracing-opentelemetry`]: Provides a layer that connects spans from multiple
311-
systems into a trace and emits them to [OpenTelemetry]-compatible distributed
312-
tracing systems for processing and visualization.
313-
([crates.io][otel-crates]|[docs][otel-docs])
314-
315310
* [`tracing-serde`]: A compatibility layer for serializing trace data with
316311
`serde` (unstable).
317312

@@ -339,7 +334,6 @@ The crates included as part of Tracing are:
339334
[`tracing-macros`]: tracing-macros
340335
[`tracing-attributes`]: tracing-attributes
341336
[`tracing-log`]: tracing-log
342-
[`tracing-opentelemetry`]: tracing-opentelemetry
343337
[`tracing-serde`]: tracing-serde
344338
[`tracing-subscriber`]: tracing-subscriber
345339
[`tracing-tower`]: tracing-tower
@@ -377,6 +371,7 @@ are not maintained by the `tokio` project. These include:
377371
- [`tracing-actix-web`] provides `tracing` integration for the `actix-web` web framework.
378372
- [`tracing-actix`] provides `tracing` integration for the `actix` actor
379373
framework.
374+
- [`axum-insights`] provides `tracing` integration and Application insights export for the `axum` web framework.
380375
- [`tracing-gelf`] implements a subscriber for exporting traces in Greylog
381376
GELF format.
382377
- [`tracing-coz`] provides integration with the [coz] causal profiler
@@ -409,6 +404,8 @@ are not maintained by the `tokio` project. These include:
409404
- [`tracing-logfmt`] provides a layer that formats events and spans into the logfmt format.
410405
- [`tracing-chrome`] provides a layer that exports trace data that can be viewed in `chrome://tracing`.
411406
- [`reqwest-tracing`] provides a middleware to trace [`reqwest`] HTTP requests.
407+
- [`tracing-cloudwatch`] provides a layer that sends events to AWS CloudWatch Logs.
408+
- [`clippy-tracing`] provides a tool to add, remove and check for `tracing::instrument`.
412409

413410
(if you're the maintainer of a `tracing` ecosystem crate not in this list,
414411
please let us know!)
@@ -419,6 +416,7 @@ please let us know!)
419416
[honeycomb.io]: https://www.honeycomb.io/
420417
[`tracing-actix`]: https://crates.io/crates/tracing-actix
421418
[`tracing-actix-web`]: https://crates.io/crates/tracing-actix-web
419+
[`axum-insights`]: https://crates.io/crates/axum-insights
422420
[`tracing-gelf`]: https://crates.io/crates/tracing-gelf
423421
[`tracing-coz`]: https://crates.io/crates/tracing-coz
424422
[coz]: https://github.com/plasma-umass/coz
@@ -440,7 +438,7 @@ please let us know!)
440438
[Tracy]: https://github.com/wolfpld/tracy
441439
[`tracing-elastic-apm`]: https://crates.io/crates/tracing-elastic-apm
442440
[Elastic APM]: https://www.elastic.co/apm
443-
[`tracing-etw`]: https://github.com/microsoft/tracing-etw
441+
[`tracing-etw`]: https://github.com/microsoft/rust_win_etw/tree/main/win_etw_tracing
444442
[ETW]: https://docs.microsoft.com/en-us/windows/win32/etw/about-event-tracing
445443
[`sentry-tracing`]: https://crates.io/crates/sentry-tracing
446444
[Sentry]: https://sentry.io/welcome/
@@ -451,6 +449,8 @@ please let us know!)
451449
[`tracing-chrome`]: https://crates.io/crates/tracing-chrome
452450
[`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing
453451
[`reqwest`]: https://crates.io/crates/reqwest
452+
[`tracing-cloudwatch`]: https://crates.io/crates/tracing-cloudwatch
453+
[`clippy-tracing`]: https://crates.io/crates/clippy-tracing
454454

455455
**Note:** that some of the ecosystem crates are currently unreleased and
456456
undergoing active development. They may be less stable than `tracing` and
@@ -466,14 +466,17 @@ Tracing.
466466
* [Diagnostics with Tracing][tokio-blog-2019-08] on the Tokio blog, August 2019
467467
* [Production-Grade Logging in Rust Applications][production-logging-2020], November 2020
468468
* [Custom Logging in Rust using `tracing` and `tracing-subscriber`, part 1][custom-logging-part-1] and [part 2][custom-logging-part-2], October 2021
469+
* [Instrumenting Axum projects][detsys-blog-2023-08], August 2023
469470

470471
[tokio-blog-2019-08]: https://tokio.rs/blog/2019-08-tracing/
472+
[detsys-blog-2023-08]: https://determinate.systems/posts/instrumenting-axum
471473

472474
#### Talks
473475

474476
* [Bay Area Rust Meetup talk and Q&A][bay-rust-2019-03], March 2019
475477
* [RustConf 2019 talk][rust-conf-2019-08-video] and [slides][rust-conf-2019-08-slides], August 2019
476478
* [Are we observable yet? @ RustyDays talk][rusty-days-2020-08-video] and [slides][rusty-days-2020-08-slides], August 2020
479+
* [Crabs with instruments!][tremorcon-2021-09], September 2021
477480

478481
[bay-rust-2019-03]: https://www.youtube.com/watch?v=j_kXRg3zlec
479482
[rust-conf-2019-08-video]: https://www.youtube.com/watch?v=JjItsfqFIdo
@@ -483,6 +486,7 @@ Tracing.
483486
[production-logging-2020]: https://medium.com/better-programming/production-grade-logging-in-rust-applications-2c7fffd108a6
484487
[custom-logging-part-1]: https://burgers.io/custom-logging-in-rust-using-tracing
485488
[custom-logging-part-2]: https://burgers.io/custom-logging-in-rust-using-tracing-part-2
489+
[tremorcon-2021-09]: https://www.youtube.com/watch?v=ZC7fyqshun8
486490

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

SECURITY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Security Policy
2+
3+
Tracing is part of the Tokio project and uses the same security policy as [Tokio][tokio-security].
4+
5+
## Report a security issue
6+
7+
The process for reporting an issue is the same as for [Tokio][tokio-security]. This includes private reporting via [email protected].
8+
9+
[tokio-security]: https://github.com/tokio-rs/tokio/security/policy
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#tracing-warning-header {
1+
<style>
2+
#tracing-warning-header {
23
z-index: 400;
34
position: fixed;
45
background-color: orange;
@@ -12,14 +13,15 @@
1213
line-height: 0.6;
1314
padding-top: 10px;
1415
padding-left: 230px;
15-
}
16+
}
1617

17-
body {
18+
body {
1819
/* add top padding to fit the warning header */
1920
padding-top: 50px !important;
20-
}
21+
}
2122

22-
.sidebar {
23+
.sidebar {
2324
/* add top padding to fit the warning header */
2425
margin-top: 50px !important;
25-
}
26+
}
27+
</style>

examples/Cargo.toml

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

88
[features]
99
default = []
@@ -21,7 +21,6 @@ tracing-futures = { version = "0.3", path = "../tracing-futures", features = ["f
2121
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" }
24-
tracing-opentelemetry = { path = "../tracing-opentelemetry" }
2524
tracing-appender = { path = "../tracing-appender" }
2625
tracing-journald = { path = "../tracing-journald" }
2726

@@ -31,9 +30,6 @@ serde_json = "1.0.82"
3130
futures = "0.3.21"
3231
tokio = { version = "1.20.0", features = ["full"] }
3332

34-
# env-logger example
35-
env_logger = "0.8.4"
36-
3733
# tower examples
3834
tower = { version = "0.4.13", features = ["full"] }
3935
http = "0.2.8"
@@ -51,10 +47,9 @@ log = "0.4.17"
5147
inferno = "0.11.6"
5248
tempfile = "3.3.0"
5349

54-
# opentelemetry example
55-
opentelemetry = { version = "0.18.0", default-features = false, features = ["trace"] }
56-
opentelemetry-jaeger = "0.17.0"
57-
5850
# fmt examples
5951
snafu = "0.6.10"
6052
thiserror = "1.0.31"
53+
54+
[lints]
55+
workspace = true

0 commit comments

Comments
 (0)