From 85ab395276ecddd0f810361ea05810e71b40e00a Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 15 May 2025 21:58:58 +1000 Subject: [PATCH] chore(telemetry): flush before ending session (#9150) I am not sure if this is currently breaking anything but it seems more correct to flush all events first and then end the session. --------- Signed-off-by: Thomas Eizinger --- rust/telemetry/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/telemetry/src/lib.rs b/rust/telemetry/src/lib.rs index a99528ba6..f9fbb3625 100644 --- a/rust/telemetry/src/lib.rs +++ b/rust/telemetry/src/lib.rs @@ -142,7 +142,6 @@ impl Telemetry { return; }; tracing::info!("Stopping telemetry"); - sentry::end_session_with_status(status); // Sentry uses blocking IO for flushing .. let _ = tokio::task::spawn_blocking(move || { @@ -154,6 +153,8 @@ impl Telemetry { tracing::debug!("Flushed telemetry"); }) .await; + + sentry::end_session_with_status(status); } pub fn set_account_slug(slug: String) {