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:
|
try:
|
||||||
logger.debug(f"Sending Agent events to Island: {events}")
|
logger.debug(f"Sending Agent events to Island: {events}")
|
||||||
self._island_api_client.send_events(events)
|
self._island_api_client.send_events(events)
|
||||||
except Exception as err:
|
except Exception:
|
||||||
logger.warning(f"Exception caught when connecting to the Island: {err}")
|
logger.exception("Exception caught when connecting to the Island")
|
||||||
|
|
||||||
def _send_remaining_events(self):
|
def _send_remaining_events(self):
|
||||||
self._send_events_to_island()
|
self._send_events_to_island()
|
||||||
|
|
Loading…
Reference in New Issue