Skip to content

Commit

Permalink
Merge branch 'main' into zp/fix-meta-stack-overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 authored Feb 7, 2024
2 parents 1b2aa5c + 1a231cd commit 2bde1a9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 35 deletions.
69 changes: 34 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/meta/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)]
Expand All @@ -41,6 +48,7 @@ pub struct MetaTelemetryReport {
streaming_job_count: u64,
// 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 {}
Expand Down Expand Up @@ -99,6 +107,10 @@ impl TelemetryReportCreator for MetaReportCreator {
.map_err(|err| err.as_report().to_string())? as u64;

Ok(MetaTelemetryReport {
rw_version: RwVersion {
version: RW_VERSION.to_string(),
git_sha: GIT_SHA.to_string(),
},
base: TelemetryReportBase {
tracking_id,
session_id,
Expand Down

0 comments on commit 2bde1a9

Please sign in to comment.