Skip to main content

init_observability

Function init_observability 

Source
pub fn init_observability(
    cfg: &ObservabilityConfig,
) -> ActorResult<ObservabilityGuard>
Expand description

Initialize logging + (optional) tracing subscriber with default fmt layer.

This is the original API for backward compatibility. It uses a stderr-based fmt layer for local logging output.

  • RUST_LOG wins over configured level; fallback to info if unset.
  • Tracing exporter only activates when both the opentelemetry feature is enabled and cfg.tracing_enabled is true.
  • Invalid endpoints fail fast; runtime delivery errors log but do not abort.