Skip to content

Solution for emitting subsegment larger than 65507 bytes #395

@aws-kj

Description

@aws-kj

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions