From cff6fd1f4cfeac739722ac34784157b8ab82dda2 Mon Sep 17 00:00:00 2001 From: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 15:08:26 -0700 Subject: [PATCH] notification: name the webhook target in failure and dead letter logs Every target dead-letters to the same topic, so without the name there is no way to tell which endpoint failed or needs a replay. --- weed/notification/webhook/webhook_queue.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weed/notification/webhook/webhook_queue.go b/weed/notification/webhook/webhook_queue.go index b58514cad2..c6bd58b488 100644 --- a/weed/notification/webhook/webhook_queue.go +++ b/weed/notification/webhook/webhook_queue.go @@ -318,7 +318,7 @@ func (t *target) handleWebhook(msg *message.Message) error { } if err := t.client.sendMessage(webhookMsg); err != nil { - glog.Errorf("failed to send message to webhook %s: %v", webhookMsg.Key, err) + glog.Errorf("webhook target %q failed to send message for %s: %v", t.name, webhookMsg.Key, err) return err } @@ -344,10 +344,12 @@ func (w *Queue) logDeadLetterMessages() error { continue } key := "unknown" + targetName := "" if msg.Metadata != nil { if keyValue, exists := msg.Metadata["key"]; exists { key = keyValue } + targetName = msg.Metadata["target"] } payload := "" if msg.Payload != nil { @@ -358,7 +360,7 @@ func (w *Queue) logDeadLetterMessages() error { payload = n.String() } } - glog.Errorf("received dead letter message: %s, key: %s", payload, key) + glog.Errorf("received dead letter message: %s, key: %s, target: %s", payload, key, targetName) case <-w.ctx.Done(): return }