From d3b00a78fe87a9ec656085644712de0438684214 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 11 May 2023 16:05:52 -0700 Subject: [PATCH] core: prepare to release v0.1.31 # 0.1.31 (May 11, 2023) This release of `tracing-core` fixes a bug that caused threads which call `dispatcher::get_default` _before_ a global default subscriber is set to never see the global default once it is set. In addition, it includes improvements for instrumentation performance in some cases, especially when using a global default dispatcher. ### Fixed - Fixed incorrect thread-local caching of `Dispatch::none` if `dispatcher::get_default` is called before `dispatcher::set_global_default` (#2593) ### Changed - Cloning a `Dispatch` that points at a global default subscriber no longer requires an `Arc` reference count increment, improving performance substantially (#2593) - `dispatcher::get_default` no longer attempts to access a thread local if the scoped dispatcher is not in use, improving performance when the default dispatcher is global (#2593) - Added `#[inline]` annotations called by the `event!` and `span!` macros to reduce the size of macro-generated code and improve recording performance (#2555) Thanks to new contributor @ldm0 for contributing to this release! --- tracing-core/CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ tracing-core/Cargo.toml | 2 +- tracing-core/README.md | 26 +++++++++++++------------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/tracing-core/CHANGELOG.md b/tracing-core/CHANGELOG.md index cf0d8e3b95..706b410f3d 100644 --- a/tracing-core/CHANGELOG.md +++ b/tracing-core/CHANGELOG.md @@ -1,3 +1,34 @@ +# 0.1.31 (May 11, 2023) + +This release of `tracing-core` fixes a bug that caused threads which call +`dispatcher::get_default` _before_ a global default subscriber is set to never +see the global default once it is set. In addition, it includes improvements for +instrumentation performance in some cases, especially when using a global +default dispatcher. + +### Fixed + +- Fixed incorrect thread-local caching of `Dispatch::none` if + `dispatcher::get_default` is called before `dispatcher::set_global_default` + ([#2593]) + +### Changed + +- Cloning a `Dispatch` that points at a global default subscriber no longer + requires an `Arc` reference count increment, improving performance + substantially ([#2593]) +- `dispatcher::get_default` no longer attempts to access a thread local if the + scoped dispatcher is not in use, improving performance when the default + dispatcher is global ([#2593]) +- Added `#[inline]` annotations called by the `event!` and `span!` macros to + reduce the size of macro-generated code and improve recording performance + ([#2555]) + +Thanks to new contributor @ldm0 for contributing to this release! + +[#2593]: https://github.com/tokio-rs/tracing/pull/2593 +[#2555]: https://github.com/tokio-rs/tracing/pull/2555 + # 0.1.30 (October 6, 2022) This release of `tracing-core` adds a new `on_register_dispatch` method to the diff --git a/tracing-core/Cargo.toml b/tracing-core/Cargo.toml index 319203a87c..408452ff12 100644 --- a/tracing-core/Cargo.toml +++ b/tracing-core/Cargo.toml @@ -8,7 +8,7 @@ name = "tracing-core" # - README.md # - Update CHANGELOG.md. # - Create "v0.1.x" git tag. -version = "0.1.30" +version = "0.1.31" authors = ["Tokio Contributors "] license = "MIT" readme = "README.md" diff --git a/tracing-core/README.md b/tracing-core/README.md index 1ef78506fe..36559489e9 100644 --- a/tracing-core/README.md +++ b/tracing-core/README.md @@ -16,9 +16,9 @@ Core primitives for application-level tracing. [Documentation][docs-url] | [Chat][discord-url] [crates-badge]: https://img.shields.io/crates/v/tracing-core.svg -[crates-url]: https://crates.io/crates/tracing-core/0.1.30 +[crates-url]: https://crates.io/crates/tracing-core/0.1.31 [docs-badge]: https://docs.rs/tracing-core/badge.svg -[docs-url]: https://docs.rs/tracing-core/0.1.30 +[docs-url]: https://docs.rs/tracing-core/0.1.31 [docs-master-badge]: https://img.shields.io/badge/docs-master-blue [docs-master-url]: https://tracing-rs.netlify.com/tracing_core [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg @@ -79,22 +79,22 @@ The following crate feature flags are available: ```toml [dependencies] - tracing-core = { version = "0.1.30", default-features = false } + tracing-core = { version = "0.1.31", default-features = false } ``` **Note**:`tracing-core`'s `no_std` support requires `liballoc`. [`tracing`]: ../tracing -[`span::Id`]: https://docs.rs/tracing-core/0.1.30/tracing_core/span/struct.Id.html -[`Event`]: https://docs.rs/tracing-core/0.1.30/tracing_core/event/struct.Event.html -[`Subscriber`]: https://docs.rs/tracing-core/0.1.30/tracing_core/subscriber/trait.Subscriber.html -[`Metadata`]: https://docs.rs/tracing-core/0.1.30/tracing_core/metadata/struct.Metadata.html -[`Callsite`]: https://docs.rs/tracing-core/0.1.30/tracing_core/callsite/trait.Callsite.html -[`Field`]: https://docs.rs/tracing-core/0.1.30/tracing_core/field/struct.Field.html -[`FieldSet`]: https://docs.rs/tracing-core/0.1.30/tracing_core/field/struct.FieldSet.html -[`Value`]: https://docs.rs/tracing-core/0.1.30/tracing_core/field/trait.Value.html -[`ValueSet`]: https://docs.rs/tracing-core/0.1.30/tracing_core/field/struct.ValueSet.html -[`Dispatch`]: https://docs.rs/tracing-core/0.1.30/tracing_core/dispatcher/struct.Dispatch.html +[`span::Id`]: https://docs.rs/tracing-core/0.1.31/tracing_core/span/struct.Id.html +[`Event`]: https://docs.rs/tracing-core/0.1.31/tracing_core/event/struct.Event.html +[`Subscriber`]: https://docs.rs/tracing-core/0.1.31/tracing_core/subscriber/trait.Subscriber.html +[`Metadata`]: https://docs.rs/tracing-core/0.1.31/tracing_core/metadata/struct.Metadata.html +[`Callsite`]: https://docs.rs/tracing-core/0.1.31/tracing_core/callsite/trait.Callsite.html +[`Field`]: https://docs.rs/tracing-core/0.1.31/tracing_core/field/struct.Field.html +[`FieldSet`]: https://docs.rs/tracing-core/0.1.31/tracing_core/field/struct.FieldSet.html +[`Value`]: https://docs.rs/tracing-core/0.1.31/tracing_core/field/trait.Value.html +[`ValueSet`]: https://docs.rs/tracing-core/0.1.31/tracing_core/field/struct.ValueSet.html +[`Dispatch`]: https://docs.rs/tracing-core/0.1.31/tracing_core/dispatcher/struct.Dispatch.html ## Supported Rust Versions