forked from p15670423/monkey
Agent: Fix exception handling for failed delivery of agent events
If there's an exception while sending the event to the island it should be logged as exception, not warning (events are not being stored, that's a big no-no). Also, the log should contain proper information of stack trace, not event type
This commit is contained in:
parent
3d27e42ff3
commit
550c375abc
|
@ -79,8 +79,8 @@ class BatchingAgentEventForwarder:
|
|||
try:
|
||||
logger.debug(f"Sending Agent events to Island: {events}")
|
||||
self._island_api_client.send_events(events)
|
||||
except Exception as err:
|
||||
logger.warning(f"Exception caught when connecting to the Island: {err}")
|
||||
except Exception:
|
||||
logger.exception("Exception caught when connecting to the Island")
|
||||
|
||||
def _send_remaining_events(self):
|
||||
self._send_events_to_island()
|
||||
|
|
Loading…
Reference in New Issue