Use metrics-id for sentry user id when we have it (#42931)

This should make it easier to correlate Sentry reports with user reports
and
github issues (for users who have diagnostics enabled)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-11-17 23:44:59 +00:00
committed by GitHub
parent 2c7bcfcb7b
commit a39ba03bcc
6 changed files with 41 additions and 318 deletions
@@ -124,66 +124,3 @@ pub struct AssistantEventData {
pub error_message: Option<String>,
pub language_name: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BacktraceFrame {
pub ip: usize,
pub symbol_addr: usize,
pub base: Option<usize>,
pub symbols: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct HangReport {
pub backtrace: Vec<BacktraceFrame>,
pub app_version: Option<SemanticVersion>,
pub os_name: String,
pub os_version: Option<String>,
pub architecture: String,
/// Identifier unique to each Zed installation (differs for stable, preview, dev)
pub installation_id: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct LocationData {
pub file: String,
pub line: u32,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Panic {
/// The name of the thread that panicked
pub thread: String,
/// The panic message
pub payload: String,
/// The location of the panic (file, line number)
#[serde(skip_serializing_if = "Option::is_none")]
pub location_data: Option<LocationData>,
pub backtrace: Vec<String>,
/// Zed version number
pub app_version: String,
/// The Git commit SHA that Zed was built at.
#[serde(skip_serializing_if = "Option::is_none")]
pub app_commit_sha: Option<String>,
/// Zed release channel (stable, preview, dev)
pub release_channel: String,
pub target: Option<String>,
pub os_name: String,
pub os_version: Option<String>,
pub architecture: String,
/// The time the panic occurred (UNIX millisecond timestamp)
pub panicked_on: i64,
/// Identifier unique to each system Zed is installed on
#[serde(skip_serializing_if = "Option::is_none")]
pub system_id: Option<String>,
/// Identifier unique to each Zed installation (differs for stable, preview, dev)
#[serde(skip_serializing_if = "Option::is_none")]
pub installation_id: Option<String>,
/// Identifier unique to each Zed session (differs for each time you open Zed)
pub session_id: String,
}
#[derive(Serialize, Deserialize)]
pub struct PanicRequest {
pub panic: Panic,
}