diff --git a/aws_xray_sdk/core/emitters/udp_emitter.py b/aws_xray_sdk/core/emitters/udp_emitter.py index bf8863af..03785a2e 100644 --- a/aws_xray_sdk/core/emitters/udp_emitter.py +++ b/aws_xray_sdk/core/emitters/udp_emitter.py @@ -60,12 +60,7 @@ def port(self): return self._port def _send_data(self, data): - - try: - self._socket.sendto(data.encode('utf-8'), (self._ip, - self._port)) - except Exception: - raise + self._socket.sendto(data.encode('utf-8'), (self._ip, self._port)) def _parse_address(self, daemon_address): try: diff --git a/aws_xray_sdk/core/models/entity.py b/aws_xray_sdk/core/models/entity.py index 4c38a5d0..38fbe10b 100644 --- a/aws_xray_sdk/core/models/entity.py +++ b/aws_xray_sdk/core/models/entity.py @@ -259,10 +259,7 @@ def serialize(self): Serialize to JSON document that can be accepted by the X-Ray backend service. It uses json to perform serialization. """ - try: - return json.dumps(self.to_dict(), default=str) - except Exception: - raise + return json.dumps(self.to_dict(), default=str) def to_dict(self): """