Add minidump crash reporting (#35263)

- [x] Handle uploading minidumps from the remote_server
- [x] Associate minidumps with panics with some sort of ID (we don't use
session_id on the remote)
  - [x] Update the protobufs and client/server code to request panics
- [x] Upload minidumps with no corresponding panic
- [x] Fill in panic info when there _is_ a corresponding panic
- [x] Use an env var for the sentry endpoint instead of hardcoding it

Release Notes:

- Zed now generates minidumps for crash reporting

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Julia Ryan 2025-08-04 20:19:42 -05:00 committed by GitHub
parent 07e3d53d58
commit 669c57b45f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 709 additions and 135 deletions

View file

@ -79,11 +79,16 @@ message OpenServerSettings {
uint64 project_id = 1;
}
message GetPanicFiles {
message GetCrashFiles {
}
message GetPanicFilesResponse {
repeated string file_contents = 2;
message GetCrashFilesResponse {
repeated CrashReport crashes = 1;
}
message CrashReport {
optional string panic_contents = 1;
optional bytes minidump_contents = 2;
}
message Extension {

View file

@ -294,9 +294,6 @@ message Envelope {
GetPathMetadata get_path_metadata = 278;
GetPathMetadataResponse get_path_metadata_response = 279;
GetPanicFiles get_panic_files = 280;
GetPanicFilesResponse get_panic_files_response = 281;
CancelLanguageServerWork cancel_language_server_work = 282;
LspExtOpenDocs lsp_ext_open_docs = 283;
@ -402,7 +399,10 @@ message Envelope {
StashPop stash_pop = 358;
GetDefaultBranch get_default_branch = 359;
GetDefaultBranchResponse get_default_branch_response = 360; // current max
GetDefaultBranchResponse get_default_branch_response = 360;
GetCrashFiles get_crash_files = 361;
GetCrashFilesResponse get_crash_files_response = 362; // current max
}
reserved 87 to 88;
@ -423,6 +423,7 @@ message Envelope {
reserved 270;
reserved 247 to 254;
reserved 255 to 256;
reserved 280 to 281;
}
message Hello {

View file

@ -99,8 +99,8 @@ messages!(
(GetHoverResponse, Background),
(GetNotifications, Foreground),
(GetNotificationsResponse, Foreground),
(GetPanicFiles, Background),
(GetPanicFilesResponse, Background),
(GetCrashFiles, Background),
(GetCrashFilesResponse, Background),
(GetPathMetadata, Background),
(GetPathMetadataResponse, Background),
(GetPermalinkToLine, Foreground),
@ -462,7 +462,7 @@ request_messages!(
(ActivateToolchain, Ack),
(ActiveToolchain, ActiveToolchainResponse),
(GetPathMetadata, GetPathMetadataResponse),
(GetPanicFiles, GetPanicFilesResponse),
(GetCrashFiles, GetCrashFilesResponse),
(CancelLanguageServerWork, Ack),
(SyncExtensions, SyncExtensionsResponse),
(InstallExtension, Ack),