1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Diagnostic topic definitions
//!
//! All diagnostics use the `/diagnostics` namespace for easy filtering and monitoring.
/// Base namespace for all diagnostics
pub const DIAGNOSTICS_NAMESPACE: &str = "/diagnostics";
// ===== Streaming Pipeline Topics =====
/// Streaming pipeline metrics (frames received, encoded, sent, dropped)
pub const TOPIC_DIAGNOSTICS_STREAMING_PIPELINE: &str = "/diagnostics/streaming/pipeline";
/// Streaming latency metrics (camera→bridge, encoding, network, e2e)
pub const TOPIC_DIAGNOSTICS_STREAMING_LATENCY: &str = "/diagnostics/streaming/latency";
/// Encoding performance metrics (encode times, slow frames, etc.)
pub const TOPIC_DIAGNOSTICS_STREAMING_ENCODING: &str = "/diagnostics/streaming/encoding";
/// Streaming bandwidth metrics (bitrate, throughput, etc.)
pub const TOPIC_DIAGNOSTICS_STREAMING_BANDWIDTH: &str = "/diagnostics/streaming/bandwidth";
// ===== WebRTC Topics =====
/// WebRTC connection metrics (peer count, connection state)
pub const TOPIC_DIAGNOSTICS_WEBRTC_CONNECTIONS: &str = "/diagnostics/webrtc/connections";
/// WebRTC quality metrics (RTT, packet loss, jitter)
pub const TOPIC_DIAGNOSTICS_WEBRTC_QUALITY: &str = "/diagnostics/webrtc/quality";
// ===== WebSocket Topics =====
/// WebSocket connection metrics
pub const TOPIC_DIAGNOSTICS_WEBSOCKET_CONNECTIONS: &str = "/diagnostics/websocket/connections";
/// WebSocket message metrics (rate, size, errors)
pub const TOPIC_DIAGNOSTICS_WEBSOCKET_MESSAGES: &str = "/diagnostics/websocket/messages";
// ===== Redis Topics =====
/// Redis connection pool metrics
pub const TOPIC_DIAGNOSTICS_REDIS_POOL: &str = "/diagnostics/redis/pool";
/// Redis operation metrics (latency, throughput)
pub const TOPIC_DIAGNOSTICS_REDIS_OPERATIONS: &str = "/diagnostics/redis/operations";
/// Redis server info metrics (from INFO command)
pub const TOPIC_DIAGNOSTICS_REDIS_INFO: &str = "/diagnostics/redis/info";
// ===== Docker Topics =====
/// Docker container metrics (CPU, memory, network per container)
pub const TOPIC_DIAGNOSTICS_DOCKER_CONTAINERS: &str = "/diagnostics/docker/containers";
// ===== Simulation Topics =====
/// Simulation backend subprocess health metrics (e.g. mujoco-sim's supervised subprocess).
///
/// Generic (not `/diagnostics/mujoco/connection`) so a future non-MuJoCo simulation backend
/// can reuse it without a topic rename.
pub const TOPIC_DIAGNOSTICS_SIMULATION_CONNECTION: &str = "/diagnostics/simulation/connection";
// ===== System Topics =====
/// System-wide resource metrics (CPU, memory, disk, network)
pub const TOPIC_DIAGNOSTICS_SYSTEM_RESOURCES: &str = "/diagnostics/system/resources";
// ===== Node Health Topics =====
/// All node health metrics (wildcard subscription)
pub const TOPIC_DIAGNOSTICS_NODE_HEALTH_ALL: &str = "/diagnostics/node/*/health";