Mark app event as `open` if we fail to get installation_id

Joseph T. Lyons created

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.

Change summary

crates/zed/src/main.rs  | 4 ++--
crates/zed2/src/main.rs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

Detailed changes

crates/zed/src/main.rs 🔗

@@ -175,8 +175,8 @@ fn main() {
         // Copy logic to zed2
         let telemetry_settings = *settings::get::<TelemetrySettings>(cx);
         let event_operation = match existing_installation_id_found {
-            Some(true) => "open",
-            _ => "first open",
+            Some(false) => "first open",
+            _ => "open",
         };
         client
             .telemetry()

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()