wtf( )unctionsystem design, drawn
← all problemsObservabilityMedium

The trace stops at the queue

The trace is complete right up to the point where the service publishes a message. After that, nothing. The consumer's work turns up as its own root trace with no parent, and the two cannot be joined.

Trace context propagates on the wire. A queue is a wire nobody remembered to put it on.

Carry the context across the asynchronous hop, and connect the two sides with the relationship that is actually true.
Components — tap one, then tap a slot on the diagram
!Traces end at the publish call. Everything the consumer does is a separate, parentless trace.

Outside every boundary: Producer (ends at publish), Consumer (batch of 50; FAILED: parentless trace), Broker, an empty slot for the what travels with the message, an empty slot for the how the two spans relate Connections: Producer calls Broker — publish (step 1) Broker calls Consumer — deliver (step 2) what travels with the message controls Broker — rides in the metadata (step 3) how the two spans relate controls Consumer (step 4) Producer must NOT reach Consumer — not a parent — it already ended

Producerends at publish
Consumerbatch of 50parentless trace
Broker