-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: define the telemetry protocol in protobuf (#14952)
- Loading branch information
1 parent
266fe25
commit 42cc7c8
Showing
4 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
syntax = "proto3"; | ||
|
||
package telemetry; | ||
|
||
enum MetaBackend { | ||
META_BACKEND_UNSPECIFIED = 0; | ||
META_BACKEND_MEMORY = 1; | ||
META_BACKEND_ETCD = 2; | ||
META_BACKEND_RDB = 3; | ||
} | ||
|
||
enum TelemetryNodeType { | ||
TELEMETRY_NODE_TYPE_UNSPECIFIED = 0; | ||
TELEMETRY_NODE_TYPE_META = 1; | ||
TELEMETRY_NODE_TYPE_COMPUTE = 2; | ||
TELEMETRY_NODE_TYPE_FRONTEND = 3; | ||
TELEMETRY_NODE_TYPE_COMPACTOR = 4; | ||
} | ||
|
||
message SystemMemory { | ||
uint64 used = 1; | ||
uint64 total = 2; | ||
} | ||
|
||
message SystemOs { | ||
string name = 1; | ||
string version = 2; | ||
string kernel_version = 3; | ||
} | ||
|
||
message SystemCpu { | ||
float available = 1; | ||
} | ||
|
||
message SystemData { | ||
SystemMemory memory = 1; | ||
SystemOs os = 2; | ||
SystemCpu cpu = 3; | ||
} | ||
|
||
// NodeCount represents how many nodes in this cluster | ||
message NodeCount { | ||
uint32 meta = 1; | ||
uint32 compute = 2; | ||
uint32 frontend = 3; | ||
uint32 compactor = 4; | ||
} | ||
|
||
// RwVersion represents the version of RisingWave | ||
message RwVersion { | ||
// Version is the Cargo package version of RisingWave | ||
string rw_version = 1; | ||
// GitSHA is the Git commit SHA of RisingWave | ||
string git_sha = 2; | ||
} | ||
|
||
message ReportBase { | ||
// tracking_id is persistent in meta data | ||
string tracking_id = 1; | ||
// session_id is reset every time node restarts | ||
string session_id = 2; | ||
// system_data is hardware and os info | ||
SystemData system_data = 3; | ||
// up_time is how long the node has been running | ||
uint64 up_time = 4; | ||
// report_time is when the report is created | ||
uint64 report_time = 5; | ||
// node_type is the node that creates the report | ||
TelemetryNodeType node_type = 6; | ||
} | ||
|
||
message MetaReport { | ||
ReportBase base = 1; | ||
// meta_backend is the backend of meta data | ||
MetaBackend meta_backend = 2; | ||
// node_count is the count of each node type | ||
NodeCount node_count = 3; | ||
// rw_version is the version of RisingWave | ||
RwVersion rw_version = 4; | ||
// This field represents the "number of running streaming jobs" | ||
// and is used to indicate whether the cluster is active. | ||
uint32 stream_job_count = 5; | ||
} | ||
|
||
message ComputeReport { | ||
ReportBase base = 1; | ||
} | ||
|
||
message FrontendReport { | ||
ReportBase base = 1; | ||
} | ||
|
||
message CompactorReport { | ||
ReportBase base = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters