natchez icon indicating copy to clipboard operation
natchez copied to clipboard

X-Ray trace finalization fails when serialized size exceeds 64K

Open bpholt opened this issue 2 years ago • 1 comments

When serializing a trace using the X-Ray backend, serialized traces larger than 64KB are rejected by the X-Ray daemon and a java.net.SocketException: Message too long is raised from the DatagramSocket, because X-Ray enforces a maximum segment document size of 64KB.

The documentation suggests "send[ing] subsegments separately … to avoid exceeding the maximum segment document size (64 kB)," but we currently only send data if it's the parent segment.

bpholt avatar Dec 02 '23 00:12 bpholt

I've been playing around with how this could be adjusted but I don't have any brilliant ideas yet. Unfortunately the structure of XRaySpan doesn't lend itself to easily generating arbitrarily large trees for test cases.

bpholt avatar Dec 02 '23 00:12 bpholt