From 4cb99d9b15e62061f02dd5bc679fd1f9a63a0bd1 Mon Sep 17 00:00:00 2001 From: Aaron <52056643+aaron-arellano@users.noreply.github.com> Date: Wed, 29 May 2024 15:18:27 -0700 Subject: [PATCH] Add more EventSource event logs for failed to publish events (#3147) Signed-off-by: Derek Wang --- USERS.md | 1 + eventsources/eventing.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/USERS.md b/USERS.md index f1156d9f6a..614751872e 100644 --- a/USERS.md +++ b/USERS.md @@ -52,3 +52,4 @@ Organizations below are **officially** using Argo Events. Please send a PR with 1. [Yubo](https://www.yubo.live/) 1. [WooliesX](https://wooliesx.com.au/) 1. [Woolworths Group](https://www.woolworthsgroup.com.au/) +1. [Zillow Group](https://www.zillow.com) \ No newline at end of file diff --git a/eventsources/eventing.go b/eventsources/eventing.go index 149e5e8a4b..ad36a38005 100644 --- a/eventsources/eventing.go +++ b/eventsources/eventing.go @@ -579,12 +579,12 @@ func (e *EventSourceAdaptor) run(ctx context.Context, servers map[apicommon.Even }, Body: eventBody, } - + logger.Debugw(string(data), zap.String("eventID", event.ID())) if err = common.DoWithRetry(&common.DefaultBackoff, func() error { return e.eventBusConn.Publish(ctx, msg) }); err != nil { logger.Errorw("Failed to publish an event", zap.Error(err), zap.String(logging.LabelEventName, - s.GetEventName()), zap.Any(logging.LabelEventSourceType, s.GetEventSourceType())) + s.GetEventName()), zap.Any(logging.LabelEventSourceType, s.GetEventSourceType()), zap.String("eventID", event.ID())) e.metrics.EventSentFailed(s.GetEventSourceName(), s.GetEventName()) return eventbuscommon.NewEventBusError(err) }