X-Ray trace finalization fails when serialized size exceeds 64K
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 340
- Forks
- 76
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at modules/xray/src/main/scala/natchez/xray/XRaySpan.scala, especially the linked code around line 338, and trace how parent and subsegment data are sent to the X-Ray daemon. Done means oversized traces are sent in a way that avoids the daemon’s 64KB segment-document limit instead of raising Message too long.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, scala
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100