-
Notifications
You must be signed in to change notification settings - Fork 99
Description
This is a feature request for cases where SDK (not only Java SDK but for any other XRay SDKs) cannot send (sub)segments if they are larger than 65507 bytes.
Currently com.amazonaws.xray.emitters.UDPEmitter best effort to send large segments to the agent is to dissolve into subsegments and eventually throw an exception with the details if the subsegment is still larger than the maximum UDP datagram size as per this code and will eventually lead to a java.io.IOException
(details behind this limitation of the UDP protocol are here)
However, there are scenarios when we cannot avoid emitting large (sub)segments due to automatic instrumentation (for example large SQL queries). For these cases there could be some mitigation/workaround to still receive the subsegment or at least a part of it.
Options:
- Truncate segment workload (SQL query text in the particular case)
- Implement TCP communication between SDK and the agent
- Implement programmatic datagram fragmentation (as UDP doesn't support fragmentation by design)