From 94bfb93d35ea8c72d1d2391ebcb4a539428219f6 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 17 Dec 2024 22:16:59 -0700 Subject: [PATCH] More telemetry events (#22171) - **Convert more events to telemetry::event** - **And call events** Closes #ISSUE Release Notes: - N/A --- Cargo.lock | 8 +++- crates/call/Cargo.toml | 1 + crates/call/src/cross_platform/mod.rs | 46 ++++++------------- crates/call/src/macos/mod.rs | 46 ++++++------------- crates/client/src/telemetry.rs | 29 +----------- crates/client/src/user.rs | 4 +- crates/collab_ui/Cargo.toml | 1 + crates/collab_ui/src/channel_view.rs | 12 +++-- crates/theme_selector/Cargo.toml | 2 +- crates/theme_selector/src/theme_selector.rs | 9 +--- crates/title_bar/Cargo.toml | 1 + crates/title_bar/src/collab.rs | 32 ++++++------- crates/welcome/Cargo.toml | 1 + crates/welcome/src/base_keymap_picker.rs | 14 +++--- crates/welcome/src/welcome.rs | 15 +----- crates/zed/Cargo.toml | 1 + crates/zed/src/main.rs | 13 ++++-- crates/zeta/Cargo.toml | 1 + crates/zeta/src/zeta.rs | 18 ++++---- .../patches/use-cross-platform-livekit.patch | 2 +- 20 files changed, 97 insertions(+), 159 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a7f690078f..abe5705761 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2115,6 +2115,7 @@ dependencies = [ "serde", "serde_derive", "settings", + "telemetry", "util", ] @@ -2782,6 +2783,7 @@ dependencies = [ "settings", "smallvec", "story", + "telemetry", "theme", "time", "time_format", @@ -12875,7 +12877,6 @@ dependencies = [ name = "theme_selector" version = "0.1.0" dependencies = [ - "client", "fs", "fuzzy", "gpui", @@ -12883,6 +12884,7 @@ dependencies = [ "picker", "serde", "settings", + "telemetry", "theme", "ui", "util", @@ -13112,6 +13114,7 @@ dependencies = [ "settings", "smallvec", "story", + "telemetry", "theme", "tree-sitter-md", "ui", @@ -14890,6 +14893,7 @@ dependencies = [ "schemars", "serde", "settings", + "telemetry", "ui", "util", "vim_mode_setting", @@ -16093,6 +16097,7 @@ dependencies = [ "tab_switcher", "task", "tasks_ui", + "telemetry", "telemetry_events", "terminal_view", "theme", @@ -16465,6 +16470,7 @@ dependencies = [ "serde_json", "settings", "similar", + "telemetry", "telemetry_events", "theme", "tree-sitter-go", diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml index 42f007dbce..332d494416 100644 --- a/crates/call/Cargo.toml +++ b/crates/call/Cargo.toml @@ -40,6 +40,7 @@ schemars.workspace = true serde.workspace = true serde_derive.workspace = true settings.workspace = true +telemetry.workspace = true util.workspace = true [target.'cfg(target_os = "macos")'.dependencies] diff --git a/crates/call/src/cross_platform/mod.rs b/crates/call/src/cross_platform/mod.rs index 4a95af1525..7530c0b265 100644 --- a/crates/call/src/cross_platform/mod.rs +++ b/crates/call/src/cross_platform/mod.rs @@ -250,7 +250,9 @@ impl ActiveCall { cx.spawn(move |this, mut cx| async move { let result = invite.await; if result.is_ok() { - this.update(&mut cx, |this, cx| this.report_call_event("invite", cx))?; + this.update(&mut cx, |this, cx| { + this.report_call_event("Participant Invited", cx) + })?; } else { //TODO: report collaboration error log::error!("invite failed: {:?}", result); @@ -318,7 +320,7 @@ impl ActiveCall { this.update(&mut cx, |this, cx| this.set_room(room.clone(), cx))? .await?; this.update(&mut cx, |this, cx| { - this.report_call_event("accept incoming", cx) + this.report_call_event("Incoming Call Accepted", cx) })?; Ok(()) }) @@ -331,7 +333,7 @@ impl ActiveCall { .borrow_mut() .take() .ok_or_else(|| anyhow!("no incoming call"))?; - report_call_event_for_room("decline incoming", call.room_id, None, &self.client); + telemetry::event!("Incoming Call Declined", room_id = call.room_id); self.client.send(proto::DeclineCall { room_id: call.room_id, })?; @@ -366,7 +368,7 @@ impl ActiveCall { this.update(&mut cx, |this, cx| this.set_room(room.clone(), cx))? .await?; this.update(&mut cx, |this, cx| { - this.report_call_event("join channel", cx) + this.report_call_event("Channel Joined", cx) })?; Ok(room) }) @@ -374,7 +376,7 @@ impl ActiveCall { pub fn hang_up(&mut self, cx: &mut ModelContext) -> Task> { cx.notify(); - self.report_call_event("hang up", cx); + self.report_call_event("Call Ended", cx); Audio::end_call(cx); @@ -393,7 +395,7 @@ impl ActiveCall { cx: &mut ModelContext, ) -> Task> { if let Some((room, _)) = self.room.as_ref() { - self.report_call_event("share project", cx); + self.report_call_event("Project Shared", cx); room.update(cx, |room, cx| room.share_project(project, cx)) } else { Task::ready(Err(anyhow!("no active call"))) @@ -406,7 +408,7 @@ impl ActiveCall { cx: &mut ModelContext, ) -> Result<()> { if let Some((room, _)) = self.room.as_ref() { - self.report_call_event("unshare project", cx); + self.report_call_event("Project Unshared", cx); room.update(cx, |room, cx| room.unshare_project(project, cx)) } else { Err(anyhow!("no active call")) @@ -486,35 +488,15 @@ impl ActiveCall { pub fn report_call_event(&self, operation: &'static str, cx: &mut AppContext) { if let Some(room) = self.room() { let room = room.read(cx); - report_call_event_for_room(operation, room.id(), room.channel_id(), &self.client); + telemetry::event!( + operation, + room_id = room.id(), + channel_id = room.channel_id() + ) } } } -pub fn report_call_event_for_room( - operation: &'static str, - room_id: u64, - channel_id: Option, - client: &Arc, -) { - let telemetry = client.telemetry(); - - telemetry.report_call_event(operation, Some(room_id), channel_id) -} - -pub fn report_call_event_for_channel( - operation: &'static str, - channel_id: ChannelId, - client: &Arc, - cx: &AppContext, -) { - let room = ActiveCall::global(cx).read(cx).room(); - - let telemetry = client.telemetry(); - - telemetry.report_call_event(operation, room.map(|r| r.read(cx).id()), Some(channel_id)) -} - #[cfg(test)] mod test { use gpui::TestAppContext; diff --git a/crates/call/src/macos/mod.rs b/crates/call/src/macos/mod.rs index 24472bd1fb..5186a6d285 100644 --- a/crates/call/src/macos/mod.rs +++ b/crates/call/src/macos/mod.rs @@ -243,7 +243,9 @@ impl ActiveCall { cx.spawn(move |this, mut cx| async move { let result = invite.await; if result.is_ok() { - this.update(&mut cx, |this, cx| this.report_call_event("invite", cx))?; + this.update(&mut cx, |this, cx| { + this.report_call_event("Participant Invited", cx) + })?; } else { //TODO: report collaboration error log::error!("invite failed: {:?}", result); @@ -311,7 +313,7 @@ impl ActiveCall { this.update(&mut cx, |this, cx| this.set_room(room.clone(), cx))? .await?; this.update(&mut cx, |this, cx| { - this.report_call_event("accept incoming", cx) + this.report_call_event("Incoming Call Accepted", cx) })?; Ok(()) }) @@ -324,7 +326,7 @@ impl ActiveCall { .borrow_mut() .take() .ok_or_else(|| anyhow!("no incoming call"))?; - report_call_event_for_room("decline incoming", call.room_id, None, &self.client); + telemetry::event!("Incoming Call Declined", room_id = call.room_id); self.client.send(proto::DeclineCall { room_id: call.room_id, })?; @@ -359,7 +361,7 @@ impl ActiveCall { this.update(&mut cx, |this, cx| this.set_room(room.clone(), cx))? .await?; this.update(&mut cx, |this, cx| { - this.report_call_event("join channel", cx) + this.report_call_event("Channel Joined", cx) })?; Ok(room) }) @@ -367,7 +369,7 @@ impl ActiveCall { pub fn hang_up(&mut self, cx: &mut ModelContext) -> Task> { cx.notify(); - self.report_call_event("hang up", cx); + self.report_call_event("Call Ended", cx); Audio::end_call(cx); @@ -386,7 +388,7 @@ impl ActiveCall { cx: &mut ModelContext, ) -> Task> { if let Some((room, _)) = self.room.as_ref() { - self.report_call_event("share project", cx); + self.report_call_event("Project Shared", cx); room.update(cx, |room, cx| room.share_project(project, cx)) } else { Task::ready(Err(anyhow!("no active call"))) @@ -399,7 +401,7 @@ impl ActiveCall { cx: &mut ModelContext, ) -> Result<()> { if let Some((room, _)) = self.room.as_ref() { - self.report_call_event("unshare project", cx); + self.report_call_event("Project Unshared", cx); room.update(cx, |room, cx| room.unshare_project(project, cx)) } else { Err(anyhow!("no active call")) @@ -479,35 +481,15 @@ impl ActiveCall { pub fn report_call_event(&self, operation: &'static str, cx: &mut AppContext) { if let Some(room) = self.room() { let room = room.read(cx); - report_call_event_for_room(operation, room.id(), room.channel_id(), &self.client); + telemetry::event!( + operation, + room_id = room.id(), + channel_id = room.channel_id() + ); } } } -pub fn report_call_event_for_room( - operation: &'static str, - room_id: u64, - channel_id: Option, - client: &Arc, -) { - let telemetry = client.telemetry(); - - telemetry.report_call_event(operation, Some(room_id), channel_id) -} - -pub fn report_call_event_for_channel( - operation: &'static str, - channel_id: ChannelId, - client: &Arc, - cx: &AppContext, -) { - let room = ActiveCall::global(cx).read(cx).room(); - - let telemetry = client.telemetry(); - - telemetry.report_call_event(operation, room.map(|r| r.read(cx).id()), Some(channel_id)) -} - #[cfg(test)] mod test { use gpui::TestAppContext; diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 258b15c727..54f3cd642b 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -19,7 +19,7 @@ use std::time::Instant; use std::{env, mem, path::PathBuf, sync::Arc, time::Duration}; use telemetry_events::{ AppEvent, AssistantEvent, CallEvent, EditEvent, Event, EventRequestBody, EventWrapper, - InlineCompletionEvent, InlineCompletionRating, InlineCompletionRatingEvent, SettingEvent, + InlineCompletionEvent, }; use util::{ResultExt, TryFutureExt}; use worktree::{UpdatedEntriesSet, WorktreeId}; @@ -349,24 +349,6 @@ impl Telemetry { self.report_event(event) } - pub fn report_inline_completion_rating_event( - self: &Arc, - rating: InlineCompletionRating, - input_events: Arc, - input_excerpt: Arc, - output_excerpt: Arc, - feedback: String, - ) { - let event = Event::InlineCompletionRating(InlineCompletionRatingEvent { - rating, - input_events, - input_excerpt, - output_excerpt, - feedback, - }); - self.report_event(event); - } - pub fn report_assistant_event(self: &Arc, event: AssistantEvent) { self.report_event(Event::Assistant(event)); } @@ -394,15 +376,6 @@ impl Telemetry { event } - pub fn report_setting_event(self: &Arc, setting: &'static str, value: String) { - let event = Event::Setting(SettingEvent { - setting: setting.to_string(), - value, - }); - - self.report_event(event) - } - pub fn log_edit_event(self: &Arc, environment: &'static str, is_via_ssh: bool) { let mut state = self.state.lock(); let period_data = state.event_coalescer.log_event(environment); diff --git a/crates/client/src/user.rs b/crates/client/src/user.rs index fab5687c41..e476ec8872 100644 --- a/crates/client/src/user.rs +++ b/crates/client/src/user.rs @@ -16,7 +16,9 @@ use util::TryFutureExt as _; pub type UserId = u64; -#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)] +#[derive( + Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, serde::Serialize, serde::Deserialize, +)] pub struct ChannelId(pub u64); impl std::fmt::Display for ChannelId { diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index 005cce6d7d..65db68ebef 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -56,6 +56,7 @@ serde_json.workspace = true settings.workspace = true smallvec.workspace = true story = { workspace = true, optional = true } +telemetry.workspace = true theme.workspace = true time.workspace = true time_format.workspace = true diff --git a/crates/collab_ui/src/channel_view.rs b/crates/collab_ui/src/channel_view.rs index f7b1e464a8..e12e4b3262 100644 --- a/crates/collab_ui/src/channel_view.rs +++ b/crates/collab_ui/src/channel_view.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use call::report_call_event_for_channel; +use call::ActiveCall; use channel::{Channel, ChannelBuffer, ChannelBufferEvent, ChannelStore}; use client::{ proto::{self, PeerId}, @@ -66,11 +66,13 @@ impl ChannelView { cx.spawn(|mut cx| async move { let channel_view = channel_view.await?; pane.update(&mut cx, |pane, cx| { - report_call_event_for_channel( - "open channel notes", + telemetry::event!( + "Channel Notes Opened", channel_id, - &workspace.read(cx).app_state().client, - cx, + room_id = ActiveCall::global(cx) + .read(cx) + .room() + .map(|r| r.read(cx).id()) ); pane.add_item(Box::new(channel_view.clone()), true, true, None, cx); })?; diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml index dc0d5f3ac4..4125ed0f34 100644 --- a/crates/theme_selector/Cargo.toml +++ b/crates/theme_selector/Cargo.toml @@ -13,7 +13,6 @@ path = "src/theme_selector.rs" doctest = false [dependencies] -client.workspace = true fs.workspace = true fuzzy.workspace = true gpui.workspace = true @@ -21,6 +20,7 @@ log.workspace = true picker.workspace = true serde.workspace = true settings.workspace = true +telemetry.workspace = true theme.workspace = true ui.workspace = true util.workspace = true diff --git a/crates/theme_selector/src/theme_selector.rs b/crates/theme_selector/src/theme_selector.rs index e69e1d6093..3502afaa74 100644 --- a/crates/theme_selector/src/theme_selector.rs +++ b/crates/theme_selector/src/theme_selector.rs @@ -1,4 +1,3 @@ -use client::telemetry::Telemetry; use fs::Fs; use fuzzy::{match_strings, StringMatch, StringMatchCandidate}; use gpui::{ @@ -27,12 +26,10 @@ pub fn init(cx: &mut AppContext) { pub fn toggle(workspace: &mut Workspace, toggle: &Toggle, cx: &mut ViewContext) { let fs = workspace.app_state().fs.clone(); - let telemetry = workspace.client().telemetry().clone(); workspace.toggle_modal(cx, |cx| { let delegate = ThemeSelectorDelegate::new( cx.view().downgrade(), fs, - telemetry, toggle.themes_filter.as_ref(), cx, ); @@ -74,7 +71,6 @@ pub struct ThemeSelectorDelegate { original_theme: Arc, selection_completed: bool, selected_index: usize, - telemetry: Arc, view: WeakView, } @@ -82,7 +78,6 @@ impl ThemeSelectorDelegate { fn new( weak_view: WeakView, fs: Arc, - telemetry: Arc, themes_filter: Option<&Vec>, cx: &mut ViewContext, ) -> Self { @@ -123,7 +118,6 @@ impl ThemeSelectorDelegate { original_theme: original_theme.clone(), selected_index: 0, selection_completed: false, - telemetry, view: weak_view, }; @@ -180,8 +174,7 @@ impl PickerDelegate for ThemeSelectorDelegate { let theme_name = cx.theme().name.clone(); - self.telemetry - .report_setting_event("theme", theme_name.to_string()); + telemetry::event!("Settings Changed", setting = "theme", value = theme_name); let appearance = Appearance::from(cx.appearance()); diff --git a/crates/title_bar/Cargo.toml b/crates/title_bar/Cargo.toml index 9d2fb598fa..df6e0afd17 100644 --- a/crates/title_bar/Cargo.toml +++ b/crates/title_bar/Cargo.toml @@ -43,6 +43,7 @@ story = { workspace = true, optional = true } theme.workspace = true ui.workspace = true util.workspace = true +telemetry.workspace = true workspace.workspace = true zed_actions.workspace = true diff --git a/crates/title_bar/src/collab.rs b/crates/title_bar/src/collab.rs index 671fa1870a..5ef724ef7a 100644 --- a/crates/title_bar/src/collab.rs +++ b/crates/title_bar/src/collab.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use call::{report_call_event_for_room, ActiveCall, ParticipantLocation, Room}; +use call::{ActiveCall, ParticipantLocation, Room}; use client::{proto::PeerId, User}; use gpui::{actions, AppContext, Task, WindowContext}; use gpui::{canvas, point, AnyElement, Hsla, IntoElement, MouseButton, Path, Styled}; @@ -19,22 +19,19 @@ actions!( fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut WindowContext) { let call = ActiveCall::global(cx).read(cx); if let Some(room) = call.room().cloned() { - let client = call.client(); let toggle_screen_sharing = room.update(cx, |room, cx| { if room.is_screen_sharing() { - report_call_event_for_room( - "disable screen share", - room.id(), - room.channel_id(), - &client, + telemetry::event!( + "Screen Share Disabled", + room_id = room.id(), + channel_id = room.channel_id(), ); Task::ready(room.unshare_screen(cx)) } else { - report_call_event_for_room( - "enable screen share", - room.id(), - room.channel_id(), - &client, + telemetry::event!( + "Screen Share Enabled", + room_id = room.id(), + channel_id = room.channel_id(), ); room.share_screen(cx) } @@ -46,14 +43,17 @@ fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut WindowContext) { fn toggle_mute(_: &ToggleMute, cx: &mut AppContext) { let call = ActiveCall::global(cx).read(cx); if let Some(room) = call.room().cloned() { - let client = call.client(); room.update(cx, |room, cx| { let operation = if room.is_muted() { - "enable microphone" + "Microphone Enabled" } else { - "disable microphone" + "Microphone Disabled" }; - report_call_event_for_room(operation, room.id(), room.channel_id(), &client); + telemetry::event!( + operation, + room_id = room.id(), + channel_id = room.channel_id(), + ); room.toggle_mute(cx) }); diff --git a/crates/welcome/Cargo.toml b/crates/welcome/Cargo.toml index 473e5e853e..3052f8b1df 100644 --- a/crates/welcome/Cargo.toml +++ b/crates/welcome/Cargo.toml @@ -28,6 +28,7 @@ schemars.workspace = true serde.workspace = true settings.workspace = true ui.workspace = true +telemetry.workspace = true util.workspace = true vim_mode_setting.workspace = true workspace.workspace = true diff --git a/crates/welcome/src/base_keymap_picker.rs b/crates/welcome/src/base_keymap_picker.rs index 7690a56151..0d546ebed2 100644 --- a/crates/welcome/src/base_keymap_picker.rs +++ b/crates/welcome/src/base_keymap_picker.rs @@ -1,5 +1,4 @@ use super::base_keymap_setting::BaseKeymap; -use client::telemetry::Telemetry; use fuzzy::{match_strings, StringMatch, StringMatchCandidate}; use gpui::{ actions, AppContext, DismissEvent, EventEmitter, FocusableView, Render, Task, View, @@ -28,10 +27,9 @@ pub fn toggle( cx: &mut ViewContext, ) { let fs = workspace.app_state().fs.clone(); - let telemetry = workspace.client().telemetry().clone(); workspace.toggle_modal(cx, |cx| { BaseKeymapSelector::new( - BaseKeymapSelectorDelegate::new(cx.view().downgrade(), fs, telemetry, cx), + BaseKeymapSelectorDelegate::new(cx.view().downgrade(), fs, cx), cx, ) }); @@ -70,7 +68,6 @@ pub struct BaseKeymapSelectorDelegate { view: WeakView, matches: Vec, selected_index: usize, - telemetry: Arc, fs: Arc, } @@ -78,7 +75,6 @@ impl BaseKeymapSelectorDelegate { fn new( weak_view: WeakView, fs: Arc, - telemetry: Arc, cx: &mut ViewContext, ) -> Self { let base = BaseKeymap::get(None, cx); @@ -90,7 +86,6 @@ impl BaseKeymapSelectorDelegate { view: weak_view, matches: Vec::new(), selected_index, - telemetry, fs, } } @@ -169,8 +164,11 @@ impl PickerDelegate for BaseKeymapSelectorDelegate { if let Some(selection) = self.matches.get(self.selected_index) { let base_keymap = BaseKeymap::from_names(&selection.string); - self.telemetry - .report_setting_event("keymap", base_keymap.to_string()); + telemetry::event!( + "Settings Changed", + setting = "keymap", + value = base_keymap.to_string() + ); update_settings_file::(self.fs.clone(), cx, move |setting, _| { *setting = Some(base_keymap) diff --git a/crates/welcome/src/welcome.rs b/crates/welcome/src/welcome.rs index 47636bf113..7a0b5711b7 100644 --- a/crates/welcome/src/welcome.rs +++ b/crates/welcome/src/welcome.rs @@ -307,15 +307,10 @@ impl Render for WelcomePage { "welcome page: toggle diagnostic telemetry".to_string(), ); this.update_settings::(selection, cx, { - let telemetry = this.telemetry.clone(); - move |settings, value| { settings.diagnostics = Some(value); - telemetry.report_setting_event( - "diagnostic telemetry", - value.to_string(), - ); + telemetry::event!("Settings Changed", setting = "diagnostic telemetry", value); } }); }), @@ -333,15 +328,9 @@ impl Render for WelcomePage { "welcome page: toggle metric telemetry".to_string(), ); this.update_settings::(selection, cx, { - let telemetry = this.telemetry.clone(); - move |settings, value| { settings.metrics = Some(value); - - telemetry.report_setting_event( - "metric telemetry", - value.to_string(), - ); + telemetry::event!("Settings Changed", setting = "metric telemetry", value); } }); }), diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index f5d0b1374d..458672b810 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -109,6 +109,7 @@ sysinfo.workspace = true tab_switcher.workspace = true task.workspace = true tasks_ui.workspace = true +telemetry.workspace = true telemetry_events.workspace = true terminal_view.workspace = true theme.workspace = true diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 0aee0c8531..5b44b08097 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -493,9 +493,16 @@ fn main() { } }) .detach(); - let telemetry = app_state.client.telemetry(); - telemetry.report_setting_event("theme", cx.theme().name.to_string()); - telemetry.report_setting_event("keymap", BaseKeymap::get_global(cx).to_string()); + telemetry::event!( + "Settings Changed", + setting = "theme", + value = cx.theme().name.to_string() + ); + telemetry::event!( + "Settings Changed", + setting = "keymap", + value = BaseKeymap::get_global(cx).to_string() + ); telemetry.flush_events(); let fs = app_state.fs.clone(); diff --git a/crates/zeta/Cargo.toml b/crates/zeta/Cargo.toml index fbd818e22a..5db6fddbbb 100644 --- a/crates/zeta/Cargo.toml +++ b/crates/zeta/Cargo.toml @@ -35,6 +35,7 @@ rpc.workspace = true serde_json.workspace = true settings.workspace = true similar.workspace = true +telemetry.workspace = true telemetry_events.workspace = true theme.workspace = true ui.workspace = true diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index f825eae93b..2c0aab65b5 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -688,16 +688,14 @@ and then another feedback: String, cx: &mut ModelContext, ) { - self.rated_completions.insert(completion.id); - self.client - .telemetry() - .report_inline_completion_rating_event( - rating, - completion.input_events.clone(), - completion.input_excerpt.clone(), - completion.output_excerpt.clone(), - feedback, - ); + telemetry::event!( + "Inline Completion Rated", + rating, + input_events = completion.input_events, + input_excerpt = completion.input_excerpt, + output_excerpt = completion.output_excerpt, + feedback + ); self.client.telemetry().flush_events(); cx.notify(); } diff --git a/script/patches/use-cross-platform-livekit.patch b/script/patches/use-cross-platform-livekit.patch index 81dcca80f6..e875b9d2b0 100644 --- a/script/patches/use-cross-platform-livekit.patch +++ b/script/patches/use-cross-platform-livekit.patch @@ -3,7 +3,7 @@ index 9ba10e56ba..bb69440691 100644 --- a/crates/call/Cargo.toml +++ b/crates/call/Cargo.toml @@ -41,10 +41,10 @@ serde_derive.workspace = true - settings.workspace = true + telemetry.workspace = true util.workspace = true -[target.'cfg(target_os = "macos")'.dependencies]