-
Notifications
You must be signed in to change notification settings - Fork 116
Description
I'm getting very frequent error messages such as:
[ERROR] write udp 127.0.0.1:45844->127.0.0.1:2000: write: message too long
I'm running a setup in ECS, where my backend sends Xray traces to a container running in the same task (over UDP). Apparently the segments I'm sending are too large. Although I can probably tweak what I'm sending as part of a segment on my end, I prefer not to sacrifice and context at all; it's very useful for debugging purposes.
I was looking at the way segments are being send:
Emitter and segment packer
It appears that there is no consideration at all for the limitation of UDP packets' max. length of 65535 - 8 - 20 (8 for the UDP header, 20 for the IP header). I think it makes sense to make the SDK aware of this limitation.
I'm not exactly sure how I would go about this, that's why I'm not proposing any solution. Should there be an explicit error returned when this limit is exceeded? Or should the SDK trim part of the segment to make it fit within this limit? I don't know. Let's open up a conversation! :)