## Motivation As mentioned in tokio-rs/tracing#1100 it makes sense to be able to set the parents of events explicitly. ## Solution For that to happen the Parent type is extracted from span.rs and a `parent` field is added to Event. Additionally the appropriate macros arms are added with corresponding tests as described in tokio-rs/tracing#1100 Closes tokio-rs/tracing#1100 Signed-off-by: Zahari Dichev <[email protected]>
tokio-trace-core
Core primitives for tokio-trace.
Overview
tokio-trace is a framework for instrumenting Rust programs to collect
structured, event-based diagnostic information. This crate defines the core
primitives of tokio-trace.
The crate provides:
-
Spanidentifies a span within the execution of a program. -
Eventrepresents a single event within a trace. -
Subscriber, the trait implemented to collect trace data. -
Field,FieldSet,Value, andValueSetrepresent the structured data attached to aSpan. -
Dispatchallows span events to be dispatched toSubscribers.
In addition, it defines the global callsite registry and per-thread current dispatcher which other components of the tracing system rely on.
Application authors will typically not use this crate directly. Instead, they
will use the tokio-trace crate, which provides a much more fully-featured
API. However, this crate's API will change very infrequently, so it may be used
when dependencies must be very stable.
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.