Stop emitting one span per SSE chunk: 361k spans in 24h, and it truncates real traces past the 1000-span cap #140
Labels
No labels
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agent-proxy#140
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Agent Proxy emits a
POST /v1/chat/completions http sendspan for every server-sent-event chunk of a streamed completion. One completion produced 965 of them. Over a 24h window the proxy emitted 361,384 such spans, which is the overwhelming majority of all trace volume it produces.Why it matters
This is not only ingest and storage cost. It destroys the debuggability of anything downstream that streams.
While diagnosing slow turns on the
sirens-dowellane on 2026-08-19, I pulled a single 183s turn trace. The trace API returned its 1000-span cap, and 965 of those 1000 rows were zero-duration chunk spans from one completion. The spans that mattered, the turn itself and its tool calls, fell outside the cap. The trace was unreadable, and the investigation had to fall back to aggregate queries instead.Any trace containing a streamed completion is effectively opaque today. That is the exact situation where an operator most wants a trace.
Numbers
Measured from SigNoz traces, 24h window ending 2026-08-19.
POST /v1/chat/completions http sendspans emitted byagent-proxy- 361,384Proposal
Chunk-level spans carry close to zero diagnostic value individually. Each has zero duration and no attribute distinguishing it from its neighbours. Options, roughly in preference order:
http sendon the streaming response path.First-token latency is the one genuinely useful thing buried in this data, and it deserves to be a real attribute rather than something reconstructed from a thousand spans.
Reproducing
Query SigNoz traces filtered to
name = 'POST /v1/chat/completions http send'grouped byservice.nameover 24h. Then fetch the details of any trace containing a streamed completion and observe the span composition against the 1000-span limit.