Skip to content

Commit

Permalink
Add metrics_id to editor_events (#13525)
Browse files Browse the repository at this point in the history
Release Notes:

- N/A
  • Loading branch information
JosephTLyons authored Jun 25, 2024
1 parent 922fcaf commit 5b7e31c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/client/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ impl Telemetry {

let request_body = EventRequestBody {
installation_id: state.installation_id.as_deref().map(Into::into),
metrics_id: state.metrics_id.as_deref().map(Into::into),
session_id: state.session_id.clone(),
is_staff: state.is_staff,
app_version: state.app_version.clone(),
Expand Down
2 changes: 2 additions & 0 deletions crates/collab/src/api/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ where
#[derive(Serialize, Debug, clickhouse::Row)]
pub struct EditorEventRow {
installation_id: String,
metrics_id: String,
operation: String,
app_version: String,
file_extension: String,
Expand Down Expand Up @@ -713,6 +714,7 @@ impl EditorEventRow {
os_version: body.os_version.clone().unwrap_or_default(),
architecture: body.architecture.clone(),
installation_id: body.installation_id.clone().unwrap_or_default(),
metrics_id: body.metrics_id.clone().unwrap_or_default(),
session_id: body.session_id.clone(),
is_staff: body.is_staff,
time: time.timestamp_millis(),
Expand Down
1 change: 1 addition & 0 deletions crates/telemetry_events/src/telemetry_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{fmt::Display, sync::Arc, time::Duration};
#[derive(Serialize, Deserialize, Debug)]
pub struct EventRequestBody {
pub installation_id: Option<String>,
pub metrics_id: Option<String>,
pub session_id: Option<String>,
pub is_staff: Option<bool>,
pub app_version: String,
Expand Down

0 comments on commit 5b7e31c

Please sign in to comment.