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 <thomas@eizinger.io>
This commit is contained in:
Thomas Eizinger
2025-05-15 21:58:58 +10:00
committed by GitHub
parent bb5cb1b5ad
commit 85ab395276

View File

@@ -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) {