Skip to content

Hand agn the trace, in the spelling it reads - #196

Merged
vitramir merged 1 commit into
mainfrom
hand-agn-the-trace
Aug 19, 2026
Merged

Hand agn the trace, in the spelling it reads#196
vitramir merged 1 commit into
mainfrom
hand-agn-the-trace

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

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 — it reports its own turns rather than having a transcript read back, so nothing was handing it anything. Its invocation.message, llm.call and tool.execution spans 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 TRACEPARENT alongside the AGYN_TRACE_ID the 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.

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.
@vitramir
vitramir merged commit 838ec48 into main Aug 19, 2026
2 checks passed
@vitramir
vitramir deleted the hand-agn-the-trace branch August 19, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant