aml_art_341514450 (11720836,com.google.android.art,com.google.android.go.art)
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/tracing-attributes am: fe7b93578a am: 1e0a76ef55 am: 528a1c1d51 am: 387dc86ee1

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tracing-attributes/+/2515735

Change-Id: Ieca382704c9e984b8392bf3de44ff430f68cce07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
tree: b2daf12e3cdbe6feed23759b95c4a9eccb4d6e42
  1. src/
  2. tests/
  3. Android.bp
  4. Cargo.toml
  5. Cargo.toml.orig
  6. CHANGELOG.md
  7. LICENSE
  8. METADATA
  9. MODULE_LICENSE_MIT
  10. OWNERS
  11. README.md
README.md

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.49+

Usage

First, add this to your Cargo.toml:

[dependencies]
tracing-attributes = "0.1.23"

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.49. 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.45, the minimum supported version will not be increased past 1.42, 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.