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

        if let Some(sentry_guard) = &self.sentry_guard {
            sentry_guard.flush(Some(FLUSH_TIMEOUT));
            tracing::info!("Sentry events are flushed");
        }

        Self::with_timeout(
            FLUSH_TIMEOUT,
            "flushing tracing spans",
            &mut self.otlp_tracing_provider,
            opentelemetry_sdk::trace::TracerProvider::force_flush,
        );
        Self::with_timeout(
            FLUSH_TIMEOUT,
            "flushing tracing logs",
            &mut self.otlp_logging_provider,
            opentelemetry_sdk::logs::LoggerProvider::force_flush,
        );
    }
Forces flushing of pending events. This method is blocking.
core/lib/vlog/src/lib.rs