1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct SystemMemory {
5 #[prost(uint64, tag = "1")]
6 pub used: u64,
7 #[prost(uint64, tag = "2")]
8 pub total: u64,
9}
10#[derive(prost_helpers::AnyPB)]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct SystemOs {
13 #[prost(string, tag = "1")]
14 pub name: ::prost::alloc::string::String,
15 #[prost(string, tag = "2")]
16 pub version: ::prost::alloc::string::String,
17 #[prost(string, tag = "3")]
18 pub kernel_version: ::prost::alloc::string::String,
19}
20#[derive(prost_helpers::AnyPB)]
21#[derive(Clone, Copy, PartialEq, ::prost::Message)]
22pub struct SystemCpu {
23 #[prost(float, tag = "1")]
24 pub available: f32,
25}
26#[derive(prost_helpers::AnyPB)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct SystemData {
29 #[prost(message, optional, tag = "1")]
30 pub memory: ::core::option::Option<SystemMemory>,
31 #[prost(message, optional, tag = "2")]
32 pub os: ::core::option::Option<SystemOs>,
33 #[prost(message, optional, tag = "3")]
34 pub cpu: ::core::option::Option<SystemCpu>,
35}
36#[derive(prost_helpers::AnyPB)]
38#[derive(Clone, Copy, PartialEq, ::prost::Message)]
39pub struct NodeCount {
40 #[prost(uint32, tag = "1")]
41 pub meta: u32,
42 #[prost(uint32, tag = "2")]
43 pub compute: u32,
44 #[prost(uint32, tag = "3")]
45 pub frontend: u32,
46 #[prost(uint32, tag = "4")]
47 pub compactor: u32,
48}
49#[derive(prost_helpers::AnyPB)]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct RwVersion {
53 #[prost(string, tag = "1")]
55 pub rw_version: ::prost::alloc::string::String,
56 #[prost(string, tag = "2")]
58 pub git_sha: ::prost::alloc::string::String,
59}
60#[derive(prost_helpers::AnyPB)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct ReportBase {
63 #[prost(string, tag = "1")]
65 pub tracking_id: ::prost::alloc::string::String,
66 #[prost(string, tag = "2")]
68 pub session_id: ::prost::alloc::string::String,
69 #[prost(message, optional, tag = "3")]
71 pub system_data: ::core::option::Option<SystemData>,
72 #[prost(uint64, tag = "4")]
74 pub up_time: u64,
75 #[prost(uint64, tag = "5")]
77 pub report_time: u64,
78 #[prost(enumeration = "TelemetryNodeType", tag = "6")]
80 pub node_type: i32,
81 #[prost(bool, tag = "7")]
84 pub is_test: bool,
85}
86#[derive(prost_helpers::AnyPB)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct MetaReport {
89 #[prost(message, optional, tag = "1")]
90 pub base: ::core::option::Option<ReportBase>,
91 #[prost(enumeration = "MetaBackend", tag = "2")]
93 pub meta_backend: i32,
94 #[prost(message, optional, tag = "3")]
96 pub node_count: ::core::option::Option<NodeCount>,
97 #[prost(message, optional, tag = "4")]
99 pub rw_version: ::core::option::Option<RwVersion>,
100 #[prost(uint32, tag = "5")]
103 pub stream_job_count: u32,
104 #[prost(message, repeated, tag = "6")]
107 pub stream_jobs: ::prost::alloc::vec::Vec<StreamJobDesc>,
108 #[prost(enumeration = "TelemetryClusterType", tag = "7")]
110 pub cluster_type: i32,
111 #[prost(string, tag = "8")]
113 pub object_store_media_type: ::prost::alloc::string::String,
114 #[prost(string, tag = "9")]
116 pub connector_usage_json_str: ::prost::alloc::string::String,
117 #[prost(string, tag = "10")]
120 pub license_info_json_str: ::prost::alloc::string::String,
121}
122#[derive(prost_helpers::AnyPB)]
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct StreamJobDesc {
125 #[prost(int32, tag = "1")]
126 pub table_id: i32,
127 #[prost(string, optional, tag = "2")]
128 pub connector_name: ::core::option::Option<::prost::alloc::string::String>,
129 #[prost(enumeration = "PlanOptimization", repeated, tag = "3")]
130 pub plan_optimizations: ::prost::alloc::vec::Vec<i32>,
131}
132#[derive(prost_helpers::AnyPB)]
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct ComputeReport {
135 #[prost(message, optional, tag = "1")]
136 pub base: ::core::option::Option<ReportBase>,
137}
138#[derive(prost_helpers::AnyPB)]
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct FrontendReport {
141 #[prost(message, optional, tag = "1")]
142 pub base: ::core::option::Option<ReportBase>,
143}
144#[derive(prost_helpers::AnyPB)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct CompactorReport {
147 #[prost(message, optional, tag = "1")]
148 pub base: ::core::option::Option<ReportBase>,
149}
150#[derive(prost_helpers::AnyPB)]
151#[derive(Clone, PartialEq, ::prost::Message)]
152pub struct EventMessage {
153 #[prost(string, tag = "1")]
155 pub tracking_id: ::prost::alloc::string::String,
156 #[prost(uint64, tag = "3")]
158 pub event_time_sec: u64,
159 #[prost(enumeration = "TelemetryEventStage", tag = "4")]
161 pub event_stage: i32,
162 #[prost(string, tag = "5")]
164 pub event_name: ::prost::alloc::string::String,
165 #[prost(string, optional, tag = "6")]
167 pub connector_name: ::core::option::Option<::prost::alloc::string::String>,
168 #[prost(enumeration = "TelemetryDatabaseObject", optional, tag = "10")]
170 pub object: ::core::option::Option<i32>,
171 #[prost(int64, tag = "7")]
173 pub catalog_id: i64,
174 #[prost(string, optional, tag = "8")]
176 pub attributes: ::core::option::Option<::prost::alloc::string::String>,
177 #[prost(string, tag = "9")]
179 pub node: ::prost::alloc::string::String,
180 #[prost(bool, tag = "11")]
182 pub is_test: bool,
183}
184#[derive(prost_helpers::AnyPB)]
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct BatchEventMessage {
187 #[prost(message, repeated, tag = "1")]
188 pub events: ::prost::alloc::vec::Vec<EventMessage>,
189}
190#[derive(prost_helpers::AnyPB)]
191#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
192#[repr(i32)]
193pub enum MetaBackend {
194 Unspecified = 0,
195 Memory = 1,
196 Etcd = 2,
197 Rdb = 3,
198}
199impl MetaBackend {
200 pub fn as_str_name(&self) -> &'static str {
205 match self {
206 Self::Unspecified => "META_BACKEND_UNSPECIFIED",
207 Self::Memory => "META_BACKEND_MEMORY",
208 Self::Etcd => "META_BACKEND_ETCD",
209 Self::Rdb => "META_BACKEND_RDB",
210 }
211 }
212 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
214 match value {
215 "META_BACKEND_UNSPECIFIED" => Some(Self::Unspecified),
216 "META_BACKEND_MEMORY" => Some(Self::Memory),
217 "META_BACKEND_ETCD" => Some(Self::Etcd),
218 "META_BACKEND_RDB" => Some(Self::Rdb),
219 _ => None,
220 }
221 }
222}
223#[derive(prost_helpers::AnyPB)]
224#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
225#[repr(i32)]
226pub enum TelemetryNodeType {
227 Unspecified = 0,
228 Meta = 1,
229 Compute = 2,
230 Frontend = 3,
231 Compactor = 4,
232}
233impl TelemetryNodeType {
234 pub fn as_str_name(&self) -> &'static str {
239 match self {
240 Self::Unspecified => "TELEMETRY_NODE_TYPE_UNSPECIFIED",
241 Self::Meta => "TELEMETRY_NODE_TYPE_META",
242 Self::Compute => "TELEMETRY_NODE_TYPE_COMPUTE",
243 Self::Frontend => "TELEMETRY_NODE_TYPE_FRONTEND",
244 Self::Compactor => "TELEMETRY_NODE_TYPE_COMPACTOR",
245 }
246 }
247 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
249 match value {
250 "TELEMETRY_NODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
251 "TELEMETRY_NODE_TYPE_META" => Some(Self::Meta),
252 "TELEMETRY_NODE_TYPE_COMPUTE" => Some(Self::Compute),
253 "TELEMETRY_NODE_TYPE_FRONTEND" => Some(Self::Frontend),
254 "TELEMETRY_NODE_TYPE_COMPACTOR" => Some(Self::Compactor),
255 _ => None,
256 }
257 }
258}
259#[derive(prost_helpers::AnyPB)]
260#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
261#[repr(i32)]
262pub enum TelemetryClusterType {
263 Unspecified = 0,
264 SingleNode = 1,
265 DockerCompose = 2,
266 Kubernetes = 3,
267 CloudHosted = 4,
268}
269impl TelemetryClusterType {
270 pub fn as_str_name(&self) -> &'static str {
275 match self {
276 Self::Unspecified => "TELEMETRY_CLUSTER_TYPE_UNSPECIFIED",
277 Self::SingleNode => "TELEMETRY_CLUSTER_TYPE_SINGLE_NODE",
278 Self::DockerCompose => "TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE",
279 Self::Kubernetes => "TELEMETRY_CLUSTER_TYPE_KUBERNETES",
280 Self::CloudHosted => "TELEMETRY_CLUSTER_TYPE_CLOUD_HOSTED",
281 }
282 }
283 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
285 match value {
286 "TELEMETRY_CLUSTER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
287 "TELEMETRY_CLUSTER_TYPE_SINGLE_NODE" => Some(Self::SingleNode),
288 "TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE" => Some(Self::DockerCompose),
289 "TELEMETRY_CLUSTER_TYPE_KUBERNETES" => Some(Self::Kubernetes),
290 "TELEMETRY_CLUSTER_TYPE_CLOUD_HOSTED" => Some(Self::CloudHosted),
291 _ => None,
292 }
293 }
294}
295#[derive(prost_helpers::AnyPB)]
296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
297#[repr(i32)]
298pub enum PlanOptimization {
299 TableOptimizationUnspecified = 0,
300}
301impl PlanOptimization {
302 pub fn as_str_name(&self) -> &'static str {
307 match self {
308 Self::TableOptimizationUnspecified => "TABLE_OPTIMIZATION_UNSPECIFIED",
309 }
310 }
311 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
313 match value {
314 "TABLE_OPTIMIZATION_UNSPECIFIED" => Some(Self::TableOptimizationUnspecified),
315 _ => None,
316 }
317 }
318}
319#[derive(prost_helpers::AnyPB)]
320#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
321#[repr(i32)]
322pub enum TelemetryEventStage {
323 Unspecified = 0,
324 CreateStreamJob = 1,
325 UpdateStreamJob = 2,
326 DropStreamJob = 3,
327 Query = 4,
328 Recovery = 5,
329}
330impl TelemetryEventStage {
331 pub fn as_str_name(&self) -> &'static str {
336 match self {
337 Self::Unspecified => "TELEMETRY_EVENT_STAGE_UNSPECIFIED",
338 Self::CreateStreamJob => "TELEMETRY_EVENT_STAGE_CREATE_STREAM_JOB",
339 Self::UpdateStreamJob => "TELEMETRY_EVENT_STAGE_UPDATE_STREAM_JOB",
340 Self::DropStreamJob => "TELEMETRY_EVENT_STAGE_DROP_STREAM_JOB",
341 Self::Query => "TELEMETRY_EVENT_STAGE_QUERY",
342 Self::Recovery => "TELEMETRY_EVENT_STAGE_RECOVERY",
343 }
344 }
345 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
347 match value {
348 "TELEMETRY_EVENT_STAGE_UNSPECIFIED" => Some(Self::Unspecified),
349 "TELEMETRY_EVENT_STAGE_CREATE_STREAM_JOB" => Some(Self::CreateStreamJob),
350 "TELEMETRY_EVENT_STAGE_UPDATE_STREAM_JOB" => Some(Self::UpdateStreamJob),
351 "TELEMETRY_EVENT_STAGE_DROP_STREAM_JOB" => Some(Self::DropStreamJob),
352 "TELEMETRY_EVENT_STAGE_QUERY" => Some(Self::Query),
353 "TELEMETRY_EVENT_STAGE_RECOVERY" => Some(Self::Recovery),
354 _ => None,
355 }
356 }
357}
358#[derive(prost_helpers::AnyPB)]
359#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
360#[repr(i32)]
361pub enum TelemetryDatabaseObject {
362 Unspecified = 0,
363 Source = 1,
364 Mv = 2,
365 Table = 3,
366 Sink = 4,
367 Index = 5,
368}
369impl TelemetryDatabaseObject {
370 pub fn as_str_name(&self) -> &'static str {
375 match self {
376 Self::Unspecified => "TELEMETRY_DATABASE_OBJECT_UNSPECIFIED",
377 Self::Source => "TELEMETRY_DATABASE_OBJECT_SOURCE",
378 Self::Mv => "TELEMETRY_DATABASE_OBJECT_MV",
379 Self::Table => "TELEMETRY_DATABASE_OBJECT_TABLE",
380 Self::Sink => "TELEMETRY_DATABASE_OBJECT_SINK",
381 Self::Index => "TELEMETRY_DATABASE_OBJECT_INDEX",
382 }
383 }
384 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
386 match value {
387 "TELEMETRY_DATABASE_OBJECT_UNSPECIFIED" => Some(Self::Unspecified),
388 "TELEMETRY_DATABASE_OBJECT_SOURCE" => Some(Self::Source),
389 "TELEMETRY_DATABASE_OBJECT_MV" => Some(Self::Mv),
390 "TELEMETRY_DATABASE_OBJECT_TABLE" => Some(Self::Table),
391 "TELEMETRY_DATABASE_OBJECT_SINK" => Some(Self::Sink),
392 "TELEMETRY_DATABASE_OBJECT_INDEX" => Some(Self::Index),
393 _ => None,
394 }
395 }
396}