From 822d52a57e8798d6e1422e9992c4925e5d5fcf2c Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 13 Jan 2026 07:26:32 -0800 Subject: [PATCH] Better logging for plugin timeouts --- crates/yaak-plugins/src/manager.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/yaak-plugins/src/manager.rs b/crates/yaak-plugins/src/manager.rs index 32d8df8f..96fa3791 100644 --- a/crates/yaak-plugins/src/manager.rs +++ b/crates/yaak-plugins/src/manager.rs @@ -378,7 +378,8 @@ impl PluginManager { plugins: Vec, timeout_duration: Duration, ) -> Result> { - let label = format!("wait[{}.{}]", plugins.len(), payload.type_name()); + let event_type = payload.type_name(); + let label = format!("wait[{}.{}]", plugins.len(), event_type); let (rx_id, mut rx) = self.subscribe(label.as_str()).await; // 1. Build the events with IDs and everything @@ -412,10 +413,21 @@ impl PluginManager { // Timeout to prevent hanging forever if plugin doesn't respond if timeout(timeout_duration, collect_events).await.is_err() { + let responded_ids: Vec<&String> = + found_events.iter().filter_map(|e| e.reply_id.as_ref()).collect(); + let non_responding: Vec<&str> = events_to_send + .iter() + .filter(|e| !responded_ids.contains(&&e.id)) + .map(|e| e.plugin_name.as_str()) + .collect(); warn!( - "Timeout waiting for plugin responses. Got {}/{} responses", + "Timeout ({:?}) waiting for {} responses. Got {}/{} responses. \ + Non-responding plugins: [{}]", + timeout_duration, + event_type, found_events.len(), - events_to_send.len() + events_to_send.len(), + non_responding.join(", ") ); }