chore(gateway): proactive close telemetry session (#7361)

This is important for the "Release Health" statistics of Sentry.
This commit is contained in:
Thomas Eizinger
2024-11-16 16:28:42 +00:00
committed by GitHub
parent 9536b8116c
commit fd04812cde

View File

@@ -55,8 +55,12 @@ async fn main() {
// That looks like a "crash" but we "just" exit with a fatal error.
if let Err(e) = try_main(cli, &mut telemetry).await {
tracing::error!(error = anyhow_dyn_err(&e));
telemetry.stop_on_crash().await;
std::process::exit(1);
}
telemetry.stop().await
}
async fn try_main(cli: Cli, telemetry: &mut Telemetry) -> Result<()> {