Hand agn the trace, in the spelling it reads - #196
Merged
Conversation
A workload is one wake cycle and one trace, derived from WORKLOAD_ID so a restart reopens rather than splits it. The trace hook is told which trace to write into; agn was not, because agn reports its own turns rather than having a transcript read back -- so it rooted its spans itself, and the message and the model call it caused landed in separate traces. It reads a parent the way any OTel process does, so it is handed TRACEPARENT. The span id is the trace's first eight bytes rather than one drawn per start: nothing here opens a span for agn to hang off, and a parent that changed between two starts of the same workload would leave the second cycle's turns pointing at something that never existed.
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A workload is one wake cycle and one trace, derived from
WORKLOAD_IDso a restart reopens rather than splits it.The trace hook is told which trace to write into. agn was not — it reports its own turns rather than having a transcript read back, so nothing was handing it anything. Its
invocation.message,llm.callandtool.executionspans therefore rooted themselves, and a run view showed the message and the model call it caused as unrelated things that happened near each other.It reads a parent the way any OTel process does, so it is handed
TRACEPARENTalongside theAGYN_TRACE_IDthe hook gets — the same trace, in the two spellings each reads.The span id is the trace's first eight bytes rather than one drawn per start. Nothing here opens a span for agn to hang off, and a parent that changed between two starts of the same workload would leave the second cycle's turns pointing at something that never existed — the same reason the trace id is derived rather than drawn.
Needs agynio/agn-cli#69, which reads it. Completes agynio/agents-orchestrator#277 (the endpoint had been naming a collector sidecar that no longer runs) and agynio/architecture#188, which describes the two span paths.