Expand description
low level tracing - has minimal dependencies
Modules§
- dispatch
- Where events are recorded and eventually sent to a sink
- dyn_
deps - Per-block dependency records for runtime property values, kept in their wire form.
- errors
- Error types and handling for tracing operations
- event
- Structure to record events in memory
- flush_
monitor - FlushMonitor triggers the flush of the telemetry streams at regular interval.
- guards
- RAII-style guards
- images
- intern_
string - Store dynamically-created strings in a global container. Strings are never released from the container.
- levels
- Verbosity management
- logs
- Events representing a process’s log
- metrics
- Events representing a measured scalar at a point in time
- panic_
hook - Reports panics as fatal log entries and shuts down the telemetry system
- parsing
- Manual parsing of dynamically sized events
- prelude
- Commonly used items for convenient importing - includes macros, types, and traits
- process_
info - Process metadata
- property_
set - Interned collection of PropertySet instances. Each PropertySet contains properties where the names and the values are statically allocated.
The user is expected to manage the cardinality: this holds for
key = static exprvalues too, since every distinct combination is interned and never freed. - property_
value - Values that the logging and metric macros accept as bare
key = valueentries. - runtime
- Runtime integration utilities for micromegas tracing
- spans
- Events reprensenting units of code execution
- static_
set_ cache - Per-callsite cache behind
key = static exprproperties. - static_
string_ ref - StaticStringRef points to a string dependency keeping track of the codec. Necessary for unreal instrumentation where ansi and wide strings can coexist. In cases where the event format does not have to be compatible with unreal, StringId can be used.
- string_
id - StringId serializes the value of the pointer and the size of a UTF8 string. StaticStringRef should be prefered where wire compatibility with unreal is important.
- test_
utils - Test utilities for in-memory tracing in unit tests
- time
- System & monotonic tick count
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.
- fmetric_
dyn - Records a float metric whose name or unit is only known at run time.
- imetric
- Records a integer metric. Use [
imetric_dyn!] when the name or unit is built at run time. - imetric_
dyn - Records an integer metric whose name or unit is only known at run time.
- info
- Logs a message at the info level.
- instrument_
named - Instruments a future with a named span.
Usage:
instrument_named!(future, "span_name") - instrument_
named_ dyn - Instruments a future with a named span whose name is built at runtime.
The future owns the name: pass a
StringorArc<str>to keep the future'static. Usage:instrument_named_dyn!(future, format!("op {id}")) - 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_
async_ named_ dyn - Instruments an async block with a named span whose name is built at runtime.
The future owns the name: pass a
StringorArc<str>to keep the future'static. - 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 needs to be statically allocated; use
span_scope_named_dyn!for a name built at runtime. - span_
scope_ named_ dyn - Records a span whose name is built at runtime, such as
format!(..)or a&String. The name is copied into each block that records one of the span’s events, so a high number of distinct names does not accumulate in memory. The guard owns the name, which is kept alive until the end of the scope. - 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.