Skip to content

Commit a884e86

Browse files
authored
Tag crash reports with panic message and release (#35692)
This _should_ allow sentry to associate related panic events with the same issue, but it doesn't change the issue title. I'm still working on figuring out how to set those fields, but in the meantime this should at least associate zed versions with crashes Release Notes: - N/A
1 parent e8052d4 commit a884e86

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

crates/zed/src/reliability.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@ async fn upload_previous_panics(
554554
.log_err();
555555
}
556556

557+
if MINIDUMP_ENDPOINT.is_none() {
558+
return Ok(most_recent_panic);
559+
}
560+
557561
// loop back over the directory again to upload any minidumps that are missing panics
558562
let mut children = smol::fs::read_dir(paths::logs_dir()).await?;
559563
while let Some(child) = children.next().await {
@@ -598,11 +602,12 @@ async fn upload_minidump(
598602
)
599603
.text("platform", "rust");
600604
if let Some(panic) = panic {
601-
form = form.text(
602-
"release",
603-
format!("{}-{}", panic.release_channel, panic.app_version),
604-
);
605-
// TODO: tack on more fields
605+
form = form
606+
.text(
607+
"sentry[release]",
608+
format!("{}-{}", panic.release_channel, panic.app_version),
609+
)
610+
.text("sentry[logentry][formatted]", panic.payload.clone());
606611
}
607612

608613
let mut response_text = String::new();

0 commit comments

Comments
 (0)