Module trace_utils

Module trace_utils 

Source

Structsยง

NoopTracer ๐Ÿ”’
A no-op tracer that does not modify or instrument any futures or closures. This is used as a fallback if no custom tracer is set.

Enumsยง

JoinSetTracerError
A custom error type for tracer injection failures.

Staticsยง

GLOBAL_TRACER ๐Ÿ”’
Global storage for an injected tracer. If no tracer is injected, a no-op tracer is used instead. This ensures that calls to trace_future or trace_block never panic due to missing instrumentation.
NOOP_TRACER ๐Ÿ”’
A no-op tracer singleton that is returned by get_tracer if no custom tracer has been registered.

Traitsยง

JoinSetTracer
A trait for injecting instrumentation into either asynchronous futures or blocking closures at runtime.

Functionsยง

get_tracer ๐Ÿ”’
Return the currently registered tracer, or the no-op tracer if none was registered.
set_join_set_tracer
Set the custom tracer for both futures and blocking closures.
trace_block
Optionally instruments a blocking closure with custom tracing.
trace_future
Optionally instruments a future with custom tracing.