Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Send os_version and country to amplitude (#20936)
Conrad Irwinebca6a8f3d15
diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rsindex fcb9ced4e57..583f9757c49 100644--- a/crates/client/src/telemetry.rs+++ b/crates/client/src/telemetry.rs@@ -224,6 +224,8 @@ impl Telemetry {cx.background_executor().spawn({let state = state.clone();+ let os_version = os_version();+ state.lock().os_version = Some(os_version.clone());async move {if let Some(tempfile) = File::create(Self::log_file_path()).log_err() {state.lock().log_file = Some(tempfile);diff --git a/crates/collab/src/api/events.rs b/crates/collab/src/api/events.rsindex 1c936bac392..2679193cade 100644--- a/crates/collab/src/api/events.rs+++ b/crates/collab/src/api/events.rs@@ -1555,15 +1555,15 @@ fn for_snowflake();map.insert("signed_in".to_string(), event.signed_in.into());if let Some(country_code) = country_code.as_ref() {- map.insert("country_code".to_string(), country_code.clone().into());+ map.insert("country".to_string(), country_code.clone().into());}}+ // NOTE: most amplitude user properties are read out of our event_properties+ // dictionary. See https://app.amplitude.com/data/zed/Zed/sources/detail/production/falcon%3A159998+ // for how that is configured.let user_properties = Some(serde_json::json!({"is_staff": body.is_staff,- "Country": country_code.clone(),- "OS": format!("{} {}", body.os_name, body.os_version.clone().unwrap_or_default()),- "Version": body.app_version.clone(),}));Some(SnowflakeRow {