From a0dcc9618ed5575ceaa426165a2406b4ad765232 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Mon, 20 Nov 2023 16:04:15 -0500 Subject: [PATCH] Mark app event as `open` if we fail to get installation_id If we find a previous installation_id, then we send `open`. If we don't find a previous installation_id, then we sent as `first open`. If we fail, we mark it as `open` so that we don't accidentally bloat our `first open` stats. --- crates/zed/src/main.rs | 4 ++-- crates/zed2/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 992a433a74..b953a782ce 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -175,8 +175,8 @@ fn main() { // Copy logic to zed2 let telemetry_settings = *settings::get::(cx); let event_operation = match existing_installation_id_found { - Some(true) => "open", - _ => "first open", + Some(false) => "first open", + _ => "open", }; client .telemetry() diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 0f6075f62e..9e851f1008 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -179,8 +179,8 @@ fn main() { client.telemetry().start(installation_id, session_id, cx); let telemetry_settings = *client::TelemetrySettings::get_global(cx); let event_operation = match existing_installation_id_found { - Some(true) => "open", - _ => "first open", + Some(false) => "first open", + _ => "open", }; client .telemetry()