Tinker with the reporting of telemetry events (#34239)
Release Notes: - N/A --------- Co-authored-by: Katie Geer <katie@zed.dev>
This commit is contained in:
parent
fbead09c30
commit
625a4b90a5
3 changed files with 15 additions and 4 deletions
|
@ -2322,7 +2322,10 @@ impl Editor {
|
||||||
editor.update_lsp_data(false, None, window, cx);
|
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
|
editor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -813,7 +813,13 @@ impl Item for Editor {
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Task<Result<()>> {
|
) -> 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 = self.buffer().clone().read(cx).all_buffers();
|
||||||
let buffers = buffers
|
let buffers = buffers
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -51,7 +51,6 @@ impl OnboardingBanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dismiss(&mut self, cx: &mut Context<Self>) {
|
fn dismiss(&mut self, cx: &mut Context<Self>) {
|
||||||
telemetry::event!("Banner Dismissed", source = self.source);
|
|
||||||
persist_dismissed(&self.source, cx);
|
persist_dismissed(&self.source, cx);
|
||||||
self.dismissed = true;
|
self.dismissed = true;
|
||||||
cx.notify();
|
cx.notify();
|
||||||
|
@ -144,7 +143,10 @@ impl Render for OnboardingBanner {
|
||||||
div().border_l_1().border_color(border_color).child(
|
div().border_l_1().border_color(border_color).child(
|
||||||
IconButton::new("close", IconName::Close)
|
IconButton::new("close", IconName::Close)
|
||||||
.icon_size(IconSize::Indicator)
|
.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(|window, cx| {
|
||||||
Tooltip::with_meta(
|
Tooltip::with_meta(
|
||||||
"Close Announcement Banner",
|
"Close Announcement Banner",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue