-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when serializing segment causes invalid message to be sent to the daemon #288
Comments
Hey @trossyvormes , Thank you for pointing this out We're fixing the Python serialization issue in PR and as for the Daemon issue you mentioned, we figured out that this is an issue introduced in the latest release happened last Friday. We'll do a patch release for both Python SDK and Daemon soon. Sorry for the inconvenience this brought to you. |
Hello Lu. Fixing the serialization error is a band-aid to the real problem which is that |
@trossyvormes Yes, totally agree that SDK should do the sanity check for this case. Will do a followup PR. |
Closing this issue as it's addressed in PR #292 |
#283 makes
Entity.to_dict
throw an exception in some cases. Whento_dict
throws an exception,Entity.serialize
returnsNone
:aws-xray-sdk-python/aws_xray_sdk/core/models/entity.py
Lines 264 to 265 in 7602447
Anyway, the
None
is put into the message that is sent to the daemon, so the daemon gets{"format":"json","version":1}\nNone
, which is an invalid message.aws-xray-sdk-python/aws_xray_sdk/core/emitters/udp_emitter.py
Lines 35 to 37 in 7602447
I don't think catching everything and returning
None
inEntity.serialize
is a good idea. The exception should continue to be raised and the message send request should be aborted.See also aws/aws-xray-daemon#120.
The text was updated successfully, but these errors were encountered: