Merge pull request #2421 from zed-industries/metrics-2

Rework telemetry code to support sending events to Clickhouse
This commit is contained in:
Joseph T. Lyons 2023-04-28 17:16:33 -04:00 committed by GitHub
commit ae5794d911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 192 additions and 60 deletions

View file

@ -172,8 +172,8 @@ fn main() {
})
.detach();
client.start_telemetry();
client.report_event(
client.telemetry().start();
client.telemetry().report_mixpanel_event(
"start app",
Default::default(),
cx.global::<Settings>().telemetry(),

View file

@ -573,7 +573,7 @@ fn open_telemetry_log_file(
workspace.with_local_workspace(&app_state.clone(), cx, move |_, cx| {
cx.spawn(|workspace, mut cx| async move {
async fn fetch_log_string(app_state: &Arc<AppState>) -> Option<String> {
let path = app_state.client.telemetry_log_file_path()?;
let path = app_state.client.telemetry().log_file_path()?;
app_state.fs.load(&path).await.log_err()
}