cmd/trace: split traces include all stack traces, which can consume all space
cmd/trace splits events into ~100MB chunks of JSON. When creating chunks, each chunk includes the full stackFrames map for the entire trace, rather than limiting to just the stack frames relevant to the events in the chunk.
In the most extreme case, the stackFrames map is >100MB of JSON, leaving no space for events. In this case, cmd/trace will include only 1 event in each split, resulting in thousands of ~useless splits.
It should be possible to mitigate this by including only relevant stack frames.
Many thanks for tracking this down so quickly.
Change https://go.dev/cl/445895 mentions this issue: WIP: only include required frames in splits