Add timestamp delta to telemetry events

This commit is contained in:
Joseph T. Lyons 2023-11-19 21:52:28 -05:00
parent 30b7da0e4a
commit 3abd376d6a
12 changed files with 343 additions and 99 deletions

View file

@ -24,7 +24,7 @@ use ::git::diff::DiffHunk;
use aho_corasick::AhoCorasick;
use anyhow::{anyhow, Context as _, Result};
use blink_manager::BlinkManager;
use client::{ClickhouseEvent, Client, Collaborator, ParticipantIndex, TelemetrySettings};
use client::{Client, Collaborator, ParticipantIndex, TelemetrySettings};
use clock::ReplicaId;
use collections::{BTreeMap, Bound, HashMap, HashSet, VecDeque};
use convert_case::{Case, Casing};
@ -8968,12 +8968,12 @@ impl Editor {
let telemetry = project.read(cx).client().telemetry().clone();
let telemetry_settings = *TelemetrySettings::get_global(cx);
let event = ClickhouseEvent::Copilot {
telemetry.report_copilot_event(
telemetry_settings,
suggestion_id,
suggestion_accepted,
file_extension,
};
telemetry.report_clickhouse_event(event, telemetry_settings);
)
}
#[cfg(any(test, feature = "test-support"))]
@ -8985,7 +8985,7 @@ impl Editor {
) {
}
#[cfg(not(any(test, feature = "test-support")))]
// #[cfg(not(any(test, feature = "test-support")))]
fn report_editor_event(
&self,
operation: &'static str,
@ -9020,14 +9020,14 @@ impl Editor {
.show_copilot_suggestions;
let telemetry = project.read(cx).client().telemetry().clone();
let event = ClickhouseEvent::Editor {
telemetry.report_editor_event(
telemetry_settings,
file_extension,
vim_mode,
operation,
copilot_enabled,
copilot_enabled_for_language,
};
telemetry.report_clickhouse_event(event, telemetry_settings)
)
}
/// Copy the highlighted chunks to the clipboard as JSON. The format is an array of lines,