From ebdc0572c652b36496c1a230c9523f7e70880d10 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 29 Sep 2025 18:03:00 +0200 Subject: [PATCH] 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 --- crates/crashes/src/crashes.rs | 1 + crates/remote_server/src/unix.rs | 2 ++ crates/zed/src/main.rs | 1 + crates/zed/src/reliability.rs | 1 + 4 files changed, 5 insertions(+) diff --git a/crates/crashes/src/crashes.rs b/crates/crashes/src/crashes.rs index be45abd05d1770220a0d8de3c8aee2c6fe946093..4c8c6ec45e621862115ef6441857ada4e2b634ad 100644 --- a/crates/crashes/src/crashes.rs +++ b/crates/crashes/src/crashes.rs @@ -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, } diff --git a/crates/remote_server/src/unix.rs b/crates/remote_server/src/unix.rs index 3a1b6c593dcf0fe55b2232cbeb1ee592cebd2f4e..cb09b91fc72404032b1f9c6334b35e24bf3d610d 100644 --- a/crates/remote_server/src/unix.rs +++ b/crates/remote_server/src/unix.rs @@ -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(), })) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index ec9c59fb4096043a05424bb50d898d69a6069e0d..2f132b27af3f07d1f50d4fa7a9fbc7bb39259248 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -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() diff --git a/crates/zed/src/reliability.rs b/crates/zed/src/reliability.rs index 4297f4c1c666d19fd184f03b62db17730c611356..dcabe93aab4ff35de44b77b87eb8495f537564fe 100644 --- a/crates/zed/src/reliability.rs +++ b/crates/zed/src/reliability.rs @@ -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();