Expand description
Shim to handle tracing v0.1 vs v0.2
NOTE for features used
Unfortunately, we can’t support the case where tracing 0.1 and 0.2 are both selected yet. This might be changed in the future. The following truth table shows the outcome when you select various feature flags.
The _oops_all_tracing_features
feature is a “trap” for when the package is built
with --all-features
, which is usually just for docs and testing. In that case, the
feature then ignores the other feature settings, and just picks tracing-01. This is
an unfortunate hack that works too well not to use for now.
_oops_all_tracing_features | tracing-01 | tracing-02 | Outcome |
---|---|---|---|
true | don’t care | don’t care | tracing-01 used |
false | false | false | Compile Error |
false | false | true | tracing-02 used |
false | true | false | tracing-01 used |
false | true | true | Compile Error |
Modules
- Callsites represent the source locations from which spans or events originate.
- Dispatches trace events to
Subscriber
s. - Events represent single points in time during the execution of a program.
Span
andEvent
key-value data.- Attach a span to a
std::future::Future
. - Trace verbosity level filtering.
- Metadata describing trace data.
- Spans represent periods of time in which a program was executing in a particular context.
- Collects and records trace data.
Macros
- Constructs an event at the debug level.
- Constructs a span at the debug level.
- Constructs an event at the error level.
- Constructs a span at the error level.
- Constructs a new
Event
. - Tests whether an event with the specified level and target would be enabled.
- Constructs an event at the info level.
- Constructs a span at the info level.
- Statically constructs new span metadata.
- Constructs a new span.
- Tests whether a span with the specified level and target would be enabled.
- Constructs an event at the trace level.
- Constructs a span at the trace level.
- Constructs an event at the warn level.
- Constructs a span at the warn level.
Structs
Dispatch
trace data to aSubscriber
.Event
s represent single points in time where something occurred during the execution of a program.- Identifies a span within the context of a subscriber.
- Describes the level of verbosity of a span or event.
- A handle representing a span, with the capability to enter the span if it exists.
Traits
- Trait implemented by callsites.
- Attaches spans to a
std::future::Future
. - Trait representing the functions required to collect trace data.
- A field value of an erased type.
Attribute Macros
- Instruments a function to create and enter a
tracing
span every time the function is called.