From 309f4010156d7ef9073c54613dbb481df141a263 Mon Sep 17 00:00:00 2001 From: Joseph T Lyons Date: Thu, 27 Oct 2022 16:19:21 -0400 Subject: [PATCH] Rename all keys, in telemetry events, to be consistent with Mixpanels conventions --- crates/client/src/telemetry.rs | 7 ++++++- crates/editor/src/editor.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 7342572ee8..e09400757c 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -69,10 +69,15 @@ struct MixpanelEventProperties { // Custom fields #[serde(skip_serializing_if = "Option::is_none", flatten)] event_properties: Option>, + #[serde(rename = "OS Name")] os_name: &'static str, + #[serde(rename = "OS Version")] os_version: Option>, + #[serde(rename = "Release Channel")] release_channel: &'static str, + #[serde(rename = "App Version")] app_version: Option>, + #[serde(rename = "Signed In")] signed_in: bool, #[serde(rename = "App")] app: &'static str, @@ -194,7 +199,7 @@ impl Telemetry { let json_bytes = serde_json::to_vec(&[MixpanelEngageRequest { token, distinct_id: device_id, - set: json!({ "staff": is_staff, "id": metrics_id }), + set: json!({ "Staff": is_staff, "ID": metrics_id }), }])?; let request = Request::post(MIXPANEL_ENGAGE_URL) .header("Content-Type", "application/json") diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 327f143db5..cb6b569223 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -6396,7 +6396,7 @@ impl Editor { project.read(cx).client().report_event( name, json!({ - "file_extension": file + "File Extension": file .path() .extension() .and_then(|e| e.to_str())