Bug: 274656617

Clone this repo:
  1. c580f84 Migrate to cargo_embargo. am: a4c1350c71 am: a83b95d3cc am: adf31a2702 by Andrew Walbran · 5 months ago main master
  2. 86fe6f1 Upgrade tracing-attributes to 0.1.27 am: 6d52557616 am: f549819d96 am: f49caf6090 by Andrew Walbran · 5 months ago
  3. b2e285a Migrate to cargo_embargo. am: a4c1350c71 am: f872848ecb am: de1289640a by Andrew Walbran · 5 months ago
  4. 219912d Upgrade tracing-attributes to 0.1.27 am: 6d52557616 am: efb1f70542 am: e0ca7becfc by Andrew Walbran · 5 months ago
  5. adf31a2 Migrate to cargo_embargo. am: a4c1350c71 am: a83b95d3cc by Andrew Walbran · 5 months ago

Tracing — Structured, application-level diagnostics

tracing-attributes

Macro attributes for application-level tracing.

Crates.io Documentation Documentation (master) MIT licensed Build Status Discord chat

Documentation | Chat

Overview

tracing is a framework for instrumenting Rust programs to collect structured, event-based diagnostic information. This crate provides the #[instrument] attribute for automatically instrumenting functions using tracing.

Note that this macro is also re-exported by the main tracing crate.

Compiler support: requires rustc 1.56+

Usage

First, add this to your Cargo.toml:

[dependencies]
tracing-attributes = "0.1.26"

This crate provides the #[instrument] attribute for instrumenting a function with a tracing span. For example:

use tracing_attributes::instrument;

#[instrument]
pub fn my_function(my_arg: usize) {
    // ...
}

Supported Rust Versions

Tracing is built against the latest stable release. The minimum supported version is 1.56. The current Tracing version is not guaranteed to build on Rust versions earlier than the minimum supported version.

Tracing follows the same compiler support policies as the rest of the Tokio project. The current stable Rust compiler and the three most recent minor versions before it will always be supported. For example, if the current stable compiler version is 1.69, the minimum supported version will not be increased past 1.66, three minor versions prior. Increasing the minimum supported compiler version is not considered a semver breaking change as long as doing so complies with this policy.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.