zed: Add binary type to sentry crash tags (#39107)

This allows to filter by main zed binary or remote server crashes, as
well as easily tell whether a crash happened in a remote-server binary
or not.

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-09-29 09:03:00 -07:00
committed by GitHub
parent cda48a3a1c
commit ebdc0572c6
4 changed files with 5 additions and 0 deletions
+1
View File
@@ -154,6 +154,7 @@ pub struct CrashInfo {
pub struct InitCrashHandler {
pub session_id: String,
pub zed_version: String,
pub binary: String,
pub release_channel: String,
pub commit_sha: String,
}
+2
View File
@@ -349,6 +349,7 @@ pub fn execute_run(
.spawn(crashes::init(crashes::InitCrashHandler {
session_id: id,
zed_version: VERSION.to_owned(),
binary: "zed-remote-server".to_string(),
release_channel: release_channel::RELEASE_CHANNEL_NAME.clone(),
commit_sha: option_env!("ZED_COMMIT_SHA").unwrap_or("no_sha").to_owned(),
}))
@@ -543,6 +544,7 @@ pub(crate) fn execute_proxy(
smol::spawn(crashes::init(crashes::InitCrashHandler {
session_id: id,
zed_version: VERSION.to_owned(),
binary: "zed-remote-server".to_string(),
release_channel: release_channel::RELEASE_CHANNEL_NAME.clone(),
commit_sha: option_env!("ZED_COMMIT_SHA").unwrap_or("no_sha").to_owned(),
}))
+1
View File
@@ -270,6 +270,7 @@ pub fn main() {
.spawn(crashes::init(InitCrashHandler {
session_id: session_id.clone(),
zed_version: app_version.to_string(),
binary: "zed".to_string(),
release_channel: release_channel::RELEASE_CHANNEL_NAME.clone(),
commit_sha: app_commit_sha
.as_ref()
+1
View File
@@ -330,6 +330,7 @@ async fn upload_minidump(
metadata.init.release_channel.clone(),
)
.text("sentry[tags][version]", metadata.init.zed_version.clone())
.text("sentry[tags][binary]", metadata.init.binary.clone())
.text("sentry[release]", metadata.init.commit_sha.clone())
.text("platform", "rust");
let mut panic_message = "".to_owned();