Skip to main content

setup_telemetry

Function setup_telemetry 

Source
pub fn setup_telemetry(
    config: Option<TelemetryConfig>,
) -> Result<TelemetryConfig, TelemetryError>
Expand description

Install telemetry providers, idempotently.

config supplies an in-memory configuration instead of reading the process environment — the Rust equivalent of Python’s setup_telemetry(config), TypeScript’s setupTelemetry(config) and Go’s WithConfig. Pass None for the environment-derived config. Rust has no default arguments, so Option is the idiom here, matching get_logger(Option<&str>) elsewhere in this crate.