Skip to main content

Module tracing_init

Module tracing_init 

Source
Expand description

Centralized tracing subscriber initialization with panic hook and log bridge. Local tracing subscriber init only (no remote telemetry / OTEL export). Centralized tracing subscriber initialization.

Configures the global subscriber with JSON or pretty format, installs the panic hook and the log-to-tracing bridge.

GAP-SG-99 / GAP-SG-108: when XDG log.to_file is truthy, also write a rolling file under the cache dir via tracing-appender. The returned [WorkerGuard] MUST be held until process exit so buffers flush.

Functions§

flush_tracing
Drop the file-appender worker so buffered events flush (GAP-SG-99).
init_tracing
Initializes the global tracing subscriber, panic hook, and log bridge.