From 925988896aa10fbed09b9ca390d6ee353cc47878 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 16 Oct 2025 00:00:40 +0200 Subject: [PATCH] Add ZMQ send debugging to identify data transmission issues Added detailed logging for ZMQ data sending to see exactly what data is being transmitted and whether sends are successful. This will help identify if the issue is in data format, sending, or dashboard reception. --- agent/src/smart_agent.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/src/smart_agent.rs b/agent/src/smart_agent.rs index 47f18c9..1f6fcf0 100644 --- a/agent/src/smart_agent.rs +++ b/agent/src/smart_agent.rs @@ -218,8 +218,10 @@ impl SmartAgent { /// Send individual metric data via ZMQ async fn send_metric_data(&self, agent_type: &AgentType, data: &serde_json::Value) { - if let Err(e) = self.send_metrics(agent_type, data).await { - error!("Failed to send {} metrics: {}", format!("{:?}", agent_type), e); + info!("Sending {} metric data: {}", format!("{:?}", agent_type), data); + match self.send_metrics(agent_type, data).await { + Ok(()) => info!("Successfully sent {} metrics via ZMQ", format!("{:?}", agent_type)), + Err(e) => error!("Failed to send {} metrics: {}", format!("{:?}", agent_type), e), } }