Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Tinker with the reporting of telemetry events (#34239)
Mikayla Maki625a4b90a50e
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 63dc8578917..a25a96cdabd 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -2322,7 +2322,10 @@ impl Editor {editor.update_lsp_data(false, None, window, cx);}- editor.report_editor_event("Editor Opened", None, cx);+ if editor.mode.is_full() {+ editor.report_editor_event("Editor Opened", None, cx);+ }+editor}diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rsindex 2e4631a62b1..4e6e471f48e 100644--- a/crates/editor/src/items.rs+++ b/crates/editor/src/items.rs@@ -813,7 +813,13 @@ impl Item for Editor {window: &mut Window,cx: &mut Context<Self>,) -> Task<Result<()>> {- self.report_editor_event("Editor Saved", None, cx);+ // Add meta data tracking # of auto saves+ if options.autosave {+ self.report_editor_event("Editor Autosaved", None, cx);+ } else {+ self.report_editor_event("Editor Saved", None, cx);+ }+let buffers = self.buffer().clone().read(cx).all_buffers();let buffers = buffers.into_iter()diff --git a/crates/title_bar/src/onboarding_banner.rs b/crates/title_bar/src/onboarding_banner.rsindex 8ed6e956af4..e7cf0cd2d93 100644--- a/crates/title_bar/src/onboarding_banner.rs+++ b/crates/title_bar/src/onboarding_banner.rs@@ -51,7 +51,6 @@ impl OnboardingBanner {}fn dismiss(&mut self, cx: &mut Context<Self>) {- telemetry::event!("Banner Dismissed", source = self.source);persist_dismissed(&self.source, cx);self.dismissed = true;cx.notify();@@ -144,7 +143,10 @@ impl Render for OnboardingBanner {div().border_l_1().border_color(border_color).child(IconButton::new("close", IconName::Close).icon_size(IconSize::Indicator)- .on_click(cx.listener(|this, _, _window, cx| this.dismiss(cx)))+ .on_click(cx.listener(|this, _, _window, cx| {+ telemetry::event!("Banner Dismissed", source = this.source);+ this.dismiss(cx)+ })).tooltip(|window, cx| {Tooltip::with_meta("Close Announcement Banner",