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.
This commit is contained in:
parent
6bc2ffd94b
commit
925988896a
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user