Skip to content

Commit

Permalink
Add more EventSource event logs for failed to publish events (#3147)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-arellano committed May 29, 2024
1 parent 6d71abd commit 70689c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions eventsources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 70689c7

Please sign in to comment.