pub fn shutdown(&mut self) {
        // We don't want to wait for too long.
        const SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(1);

        // `take` here and below ensures that we don't have any access to the deinitialized resources.
        if let Some(sentry_guard) = self.sentry_guard.take() {
            sentry_guard.close(Some(SHUTDOWN_TIMEOUT));
            tracing::info!("Sentry client is shut down");
        }

        Self::with_timeout(
            SHUTDOWN_TIMEOUT,
            "shutting down OTLP tracing provider",
            &mut self.otlp_tracing_provider,
            opentelemetry_sdk::trace::TracerProvider::shutdown,
        );
        Self::with_timeout(
            SHUTDOWN_TIMEOUT,
            "shutting down OTLP logging provider",
            &mut self.otlp_logging_provider,
            opentelemetry_sdk::logs::LoggerProvider::shutdown,
        );
    }
Shutdown the observability subsystem.
It will stop any background tasks and release resources.
core/lib/vlog/src/lib.rs