init_tracing_subscriber

Function init_tracing_subscriber 

Source
pub fn init_tracing_subscriber<W>(
    filter: EnvFilter,
    writer: W,
    with_target: bool,
    trace_export: Option<TraceExportConfig>,
) -> Result<(), AppError>
where W: for<'writer> MakeWriter<'writer> + Send + Sync + 'static,
Expand description

Initialize the global tracing subscriber with optional OTLP trace export.

Call this exactly once from the process entrypoint. When trace_export is enabled, spans emitted through tracing are exported to the configured OTLP collector while still being written to the local log output.