Skip to main content

install_tracing_interop

Function install_tracing_interop 

Source
pub fn install_tracing_interop(interop_max_level_override: Option<LevelFilter>)
Expand description

Installs a tracing layer that forwards events to the Micromegas tracing system.

This allows applications using the tracing crate to integrate with Micromegas telemetry.

ยงArguments

  • interop_max_level_override - An optional LevelFilter to override the maximum level for the tracing layer. If None, the global Micromegas max level is used.

tracing spans are recorded as async spans, but only when CPU tracing is enabled (MICROMEGAS_ENABLE_CPU_TRACING) and only on threads that have a Micromegas thread stream (e.g. runtime threads or a thread holding a TracingThreadGuard); spans on other threads are not recorded. Build a TracingCaptureLayer with capture_spans: false to forward events only.