Measure actual queue latency separately from request execution #60
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#60
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?
Problem
The
queue.waittrace span does not measure time spent waiting for a worker. It starts after the job is enqueued and remains open until the request future completes, so it includes queue delay, resilience dispatch, the upstream model call, and response completion.This makes SigNoZ report model execution time as queue latency and can produce false queue-saturation diagnoses.
Observed evidence
A read-only SigNoZ review of two successful
agent-proxyrequests found:request.chatspan lasted about 14.445 seconds whileupstream.chatlasted about 14.443 seconds.request.chatspan lasted about 2.107 seconds whileupstream.chatlasted about 2.105 seconds.queue.waitspans lasted about 14.445 and 2.107 seconds.The evidence indicates that upstream execution dominated both requests. It does not indicate that either request waited that long in the queue.
Cause
app/queue.pystartsqueue.waitaroundawait future. The worker completes that future only after dispatch and upstream execution finish.Desired behavior
Agent Proxy records actual enqueue-to-dequeue latency independently from execution latency.
A suitable shape is:
queue.waitspan, or record a queue-wait histogram, when a worker dequeues the job.Acceptance
upstream.chatlatency.