Mountain/RPC/
telemetry.rs1use serde::{Deserialize, Serialize};
6
7pub struct TelemetryService;
9
10impl TelemetryService {
11 pub fn new() -> Self { Self {} }
12}
13
14impl Default for TelemetryService {
15 fn default() -> Self { Self::new() }
16}
17
18pub mod spans {
20 use super::*;
21
22 #[derive(Debug, Clone, Serialize, Deserialize)]
24 pub struct TraceSpan {
25 pub trace_id:String,
26 pub span_id:String,
27 pub parent_span_id:Option<String>,
28 pub name:String,
29 pub start_time:i64,
30 pub end_time:Option<i64>,
31 }
32}
33
34pub mod metrics {
36 use super::*;
37
38 #[derive(Debug, Clone, Serialize, Deserialize)]
40 pub struct ServiceMetrics {
41 pub name:String,
42 pub count:u64,
43 pub sum:f64,
44 }
45}