Expand description
Commonly used items for convenient importing - includes macros, types, and traits
Macros§
- debug
- Logs a message at the debug level.
- error
- Logs a message at the error level.
- fatal
- Logs a message representing a crash or panic
- fmetric
- Records a float metric.
- imetric
- Records a integer metric.
- info
- Logs a message at the info level.
- instrument_
named - Instruments a future with a named span.
Usage:
instrument_named!(future, "span_name") - log
- The standard logging macro.
- log_
enabled - Determines if a message logged at the specified level in that module will be logged.
- span_
async_ named - Instruments an async block with a named span using a static string. This creates both the SpanLocation and instruments the future in one macro call.
- span_
scope - Records a sync span as two thread events
- span_
scope_ named - Records a span with a name that is determined at runtime. The span name still needs to be statically allocated.
- static_
span_ desc - static_
span_ location - Creates a static SpanLocation for use with named async spans.
This is an internal implementation detail - users should use
instrument_named!instead. - trace
- Logs a message at the trace level.
- warn
- Logs a message at the warn level.
Structs§
- Dual
Time - Instrumented
Future - A wrapper that instruments a future with async span tracing
- Instrumented
Named Future - A wrapper that instruments a future with named async span tracing
- Parse
Level Error - Process
Info - Span
Context Future - A future wrapper that establishes a span context on every poll.
Enums§
- Level
- An enum representing the verbosity levels for logging.
- Level
Filter - An enum representing the available verbosity level filters of the logger.
- LodFilter
- An enum representing the available verbosity level filters of the logger.
- Verbosity
- An enum representing the level of verbosity for
metrics/thread_spans/spans.
Constants§
- STATIC_
MAX_ LEVEL - The statically resolved maximum log level.
- STATIC_
MAX_ LOD - The statically resolved maximum metrics/spans lod.
Traits§
- Instrument
Future - Trait for adding instrumentation to futures
- Tracing
Runtime Ext - Extension trait for
tokio::runtime::Builderthat adds tracing lifecycle callbacks.
Functions§
- current_
span_ id - Returns the current span ID from the async call stack. Returns 0 (root) if no span is active.
- frequency
- max_
level - Returns the current maximum log level.
- max_lod
- Returns the current maximum log level.
- now
- set_
max_ level - Sets the global maximum log level.
- set_
max_ lod - Sets the global maximum log level.
- spawn_
with_ context - Spawns a future on the tokio runtime while preserving the current span context.