typelevel / typelevel/natchez

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

Open
#925 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.