pub fn try_build(self) -> anyhow::Result<ObservabilityGuard> {
        let logs = self.logs.unwrap_or_default();
        logs.install_panic_hook();

        // For now we use logs filter as a global filter for subscriber.
        // Later we may want to enforce each layer to have its own filter.
        let global_filter = logs.build_filter();

        let logs_layer = logs.into_layer();
        let (otlp_tracing_provider, otlp_tracing_layer) = self
            .opentelemetry_layer
            .as_ref()
            .and_then(|layer| layer.tracing_layer())
            .unzip();
        let (otlp_logging_provider, otlp_logging_layer) = self
            .opentelemetry_layer
            .and_then(|layer| layer.logs_layer())
            .unzip();

        tracing_subscriber::registry()
            .with(global_filter)
            .with(logs_layer)
            .with(otlp_tracing_layer)
            .with(otlp_logging_layer)
            .try_init()
            .context("failed installing global tracer / logger")?;

        let sentry_guard = self.sentry.map(|sentry| sentry.install());

        Ok(ObservabilityGuard {
            otlp_tracing_provider,
            otlp_logging_provider,
            sentry_guard,
        })
    }
Tries to initialize the observability subsystem. Returns an error if it's already initialized.
This is mostly useful in tests.
core/lib/vlog/src/lib.rs