pub fn init_if_enabled(enabled: bool) -> boolExpand description
Initialises tracing if both:
- The crate was compiled with the
otelfeature, and enabledistrue(typically driven by the--traceCLI flag).
On (true, true): installs a tracing-subscriber global
dispatcher with JSON formatting to stdout, level filter from
RUST_LOG (default info).
In any other case: returns immediately, no global state mutated.
ยงReturns
true if a subscriber was installed; false otherwise.