Macro attributes for application-level tracing.
[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.
First, add this to your Cargo.toml
:
toml
[dependencies]
tracing-attributes = "0.1.3"
This crate provides the #[instrument]
attribute for instrumenting a function
with a tracing
[span]. For example:
```rust use tracing_attributes::instrument;
pub fn myfunction(myarg: usize) { // ... } ```
This project is licensed under the MIT license.
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.