diff --git a/src/meta/src/telemetry.rs b/src/meta/src/telemetry.rs index fdb0ed06fd769..f36a36db39eb5 100644 --- a/src/meta/src/telemetry.rs +++ b/src/meta/src/telemetry.rs @@ -18,6 +18,7 @@ use risingwave_common::telemetry::{ current_timestamp, SystemData, TelemetryNodeType, TelemetryReport, TelemetryReportBase, TelemetryResult, }; +use risingwave_common::{GIT_SHA, RW_VERSION}; use risingwave_pb::common::WorkerType; use serde::{Deserialize, Serialize}; use thiserror_ext::AsReport; @@ -33,6 +34,12 @@ struct NodeCount { compactor_count: u64, } +#[derive(Debug, Serialize, Deserialize)] +struct RwVersion { + version: String, + git_sha: String, +} + #[derive(Debug, Serialize, Deserialize)] pub struct MetaTelemetryReport { #[serde(flatten)] @@ -40,6 +47,7 @@ pub struct MetaTelemetryReport { node_count: NodeCount, // At this point, it will always be etcd, but we will enable telemetry when using memory. meta_backend: MetaBackend, + rw_version: RwVersion, } impl TelemetryReport for MetaTelemetryReport {} @@ -92,6 +100,10 @@ impl TelemetryReportCreator for MetaReportCreator { .map_err(|err| err.as_report().to_string())?; Ok(MetaTelemetryReport { + rw_version: RwVersion { + version: RW_VERSION.to_string(), + git_sha: GIT_SHA.to_string(), + }, base: TelemetryReportBase { tracking_id, session_id,