Skip to content

Commit

Permalink
tracing: prepare to release 0.1.14 (#716)
Browse files Browse the repository at this point in the history
# 0.1.14 (May 14, 2020)

### Added

- **log**: When using the [`log`] compatibility feature alongside a 
  `tracing` `Subscriber`, log records for spans now include span IDs
  (#613)
- **attributes**: Support for using `#[instrument]` on methods that are
  part of [`async-trait`] trait implementations (#711)
- **attributes**: Optional `#[instrument(err)]` argument to 
  automatically emit an event if an instrumented function returns 
  `Err` (#637) 
- Added `#[must_use]` attribute to the guard returned by
  `subscriber::set_default` (#685)
  
### Changed

- **log**: Made [`log`] records emitted by spans much less noisy when
  span IDs are not available (#613)
 
### Fixed

- Several typos in the documentation (#656, #710, #715)

Thanks to @FintanH, @shepmaster, @inanna-malick, @zekisharif, @bkchr,
@majecty, @ilana and @nightmared for contributing to this release! 

[`async-trait`]: https://crates.io/crates/async-traite! 
[`log`]: https://crates.io/crates/log
  • Loading branch information
hawkw authored May 14, 2020
1 parent b0d75ff commit 2c6a563
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 13 deletions.
10 changes: 5 additions & 5 deletions tracing-subscriber/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use tracing_core::dispatcher::{self, Dispatch};
/// `Subscriber`, may implement `Into<Dispatch>`, and will also receive an
/// implementation of this trait.
///
/// [default subscriber]: https://docs.rs/tracing/0.1.13/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [trace dispatcher]: https://docs.rs/tracing/0.1.13/tracing/dispatcher/index.html
/// [default subscriber]: https://docs.rs/tracing/0.1.14/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [trace dispatcher]: https://docs.rs/tracing/0.1.14/tracing/dispatcher/index.html
pub trait SubscriberInitExt
where
Self: Into<Dispatch>,
Expand All @@ -27,7 +27,7 @@ where
/// a [`log`] compatibility layer. This allows the subscriber to consume
/// `log::Record`s as though they were `tracing` `Event`s.
///
/// [default subscriber]: https://docs.rs/tracing/0.1.13/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [default subscriber]: https://docs.rs/tracing/0.1.14/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [`log`]: https://crates.io/log
fn set_default(self) -> dispatcher::DefaultGuard {
#[cfg(feature = "tracing-log")]
Expand All @@ -47,7 +47,7 @@ where
/// been set, or if a `log` logger has already been set (when the
/// "tracing-log" feature is enabled).
///
/// [global default subscriber]: https://docs.rs/tracing/0.1.13/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [global default subscriber]: https://docs.rs/tracing/0.1.14/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [`log`]: https://crates.io/log
fn try_init(self) -> Result<(), TryInitError> {
#[cfg(feature = "tracing-log")]
Expand All @@ -69,7 +69,7 @@ where
/// or if a `log` logger has already been set (when the "tracing-log"
/// feature is enabled).
///
/// [global default subscriber]: https://docs.rs/tracing/0.1.13/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [global default subscriber]: https://docs.rs/tracing/0.1.14/tracing/dispatcher/index.html#setting-the-default-subscriber
/// [`log`]: https://crates.io/log
fn init(self) {
self.try_init()
Expand Down
28 changes: 28 additions & 0 deletions tracing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# 0.1.14 (May 14, 2020)

### Added

- **log**: When using the [`log`] compatibility feature alongside a `tracing`
`Subscriber`, log records for spans now include span IDs (#613)
- **attributes**: Support for using `#[instrument]` on methods that are part of
[`async-trait`] trait implementations (#711)
- **attributes**: Optional `#[instrument(err)]` argument to automatically emit
an event if an instrumented function returns `Err` (#637)
- Added `#[must_use]` attribute to the guard returned by
`subscriber::set_default` (#685)

### Changed

- **log**: Made [`log`] records emitted by spans much less noisy when span IDs are
not available (#613)

### Fixed

- Several typos in the documentation (#656, #710, #715)

Thanks to @FintanH, @shepmaster, @inanna-malick, @zekisharif, @bkchr, @majecty,
@ilana and @nightmared for contributing to this release!

[`async-trait`]: https://crates.io/crates/async-trait
[`log`]: https://crates.io/crates/log

# 0.1.13 (February 26, 2019)

### Added
Expand Down
4 changes: 2 additions & 2 deletions tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "tracing"
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag
version = "0.1.13"
version = "0.1.14"
authors = ["Eliza Weisman <eliza@buoyant.io>", "Tokio Contributors <team@tokio.rs>"]
license = "MIT"
readme = "README.md"
Expand All @@ -29,7 +29,7 @@ edition = "2018"
[dependencies]
tracing-core = { path = "../tracing-core", version = "0.1.10", default-features = false }
log = { version = "0.4", optional = true }
tracing-attributes = { path = "../tracing-attributes", version = "0.1.7", optional = true }
tracing-attributes = { path = "../tracing-attributes", version = "0.1.8", optional = true }
cfg-if = "0.1.10"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Application-level tracing for Rust.
[Documentation][docs-url] | [Chat][discord-url]

[crates-badge]: https://img.shields.io/crates/v/tracing.svg
[crates-url]: https://crates.io/crates/tracing/0.1.13
[crates-url]: https://crates.io/crates/tracing/0.1.14
[docs-badge]: https://docs.rs/tracing/badge.svg
[docs-url]: https://docs.rs/tracing/0.1.13
[docs-url]: https://docs.rs/tracing/0.1.14
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
[docs-master-url]: https://tracing-rs.netlify.com/tracing
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
Expand Down Expand Up @@ -241,7 +241,7 @@ my_future
is as long as the future's.

The second, and preferred, option is through the
[`#[instrument]`](https://docs.rs/tracing/0.1.13/tracing/attr.instrument.html)
[`#[instrument]`](https://docs.rs/tracing/0.1.14/tracing/attr.instrument.html)
attribute:

```rust
Expand Down Expand Up @@ -288,7 +288,7 @@ span.in_scope(|| {
// Dropping the span will close it, indicating that it has ended.
```

The [`#[instrument]`](https://docs.rs/tracing/0.1.13/tracing/attr.instrument.html) attribute macro
The [`#[instrument]`](https://docs.rs/tracing/0.1.14/tracing/attr.instrument.html) attribute macro
can reduce some of this boilerplate:

```rust
Expand Down
4 changes: 2 additions & 2 deletions tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
//!
//! ```toml
//! [dependencies]
//! tracing = { version = "0.1.13", default-features = false }
//! tracing = { version = "0.1.14", default-features = false }
//! ```
//!
//! *Compiler support: requires rustc 1.39+*
Expand Down Expand Up @@ -756,7 +756,7 @@
//! [flags]: #crate-feature-flags
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(html_root_url = "https://docs.rs/tracing/0.1.13")]
#![doc(html_root_url = "https://docs.rs/tracing/0.1.14")]
#![warn(
missing_debug_implementations,
missing_docs,
Expand Down

0 comments on commit 2c6a563

Please sign in to comment.