Skip to main content

Module observability

Module observability 

Source
Expand description

Observability bootstrap (Arm 8): one tracing subscriber for the binaries.

The dispatcher’s hot path emits leveled tracing events instead of raw eprintln!/println!, so per-dispatched-task narration is trace/debug and is filtered out at the default info level — a high task rate no longer pays a synchronous, locked-stderr write per event (KNOWN_ISSUES D-11). Verbosity is runtime-controlled via RUST_LOG (e.g. RUST_LOG=debug, RUST_LOG=cortex=trace), so the detail is available on demand without a rebuild.

Functions§

init_cli_tracing
Initializes the tracing subscriber for the cortex CLI. Like init_tracing (stderr, RUST_LOG-filtered, idempotent), but when RUST_LOG is unset the level is driven by the CLI’s -v/-q flags rather than defaulting to info:
init_tracing
Initializes the process-wide tracing subscriber: a plain stderr formatter filtered by RUST_LOG (default info). Idempotent and panic-free — uses try_init, so a second call (or a test that already installed a subscriber) is a no-op rather than a panic. Call once at the top of each binary’s main (the dispatcher and frontend; the CLI uses init_cli_tracing).