Skip to content

Give agn's spans a listener again - #200

Merged
vitramir merged 1 commit into
mainfrom
restore-agn-tracing-proxy
Sep 1, 2026
Merged

vitramir merged 1 commit into
mainfrom
restore-agn-tracing-proxy

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

dda0ff6 moved the CLIs to a transcript the trace hook reads, and dropped the OTLP proxy. That reasoning fits codex and claude — their telemetry reports that a model call happened and not what was in it.

agn is not one of those. It reports its own turns, and sets agyn.llm.response_text and the tool calls on them itself (agn-cli/internal/loop/agent.go). It keeps no transcript for the hook to read, so nothing runs the hook for it.

That left agn exporting to 127.0.0.1:4317 with nothing bound to it — the orchestrator still injects that endpoint (assembler.go:1127) — while the daemon exports only the invocation message, since Exporter.Turns is reached from cmd/agynd-trace-hook alone. agn's llm.call and tool.execution spans went nowhere.

The trace therefore holds the message with no call under it, which is what the two agn-runtime E2E tests report:

tracing_test.go:19: expected llm.call count 1, got 0
tracing_test.go:59: expected tool.execution count 2, got 0

Both reproduced on three CI runs, on 4-core and 8-core runners alike, with the workload healthy and every upstream LLM call returning 200 — the calls happen, only their spans are lost. They still pass on a local VM because it runs cached older images.

internal/tracingproxy is restored from dda0ff6^ and started on the agn path only; codex and claude keep the hook. The endpoint is passed to agn explicitly from the proxy's own address, so whatever the workload was handed cannot point it somewhere nothing is listening.

go build, go vet and go test ./... pass, including the restored package's own tests.

dda0ff6 moved the CLIs to a transcript the trace hook reads and dropped
the OTLP proxy. That fits codex and claude, whose telemetry reports that a
model call happened and not what was in it. agn is not one of those: it
reports its own turns, sets the response text and tool calls on them, and
keeps no transcript for the hook to read.

So agn was left exporting to 127.0.0.1:4317 with nothing bound to it, and
the daemon only exports the invocation message -- Turns is reached from
the hook alone. Its llm.call and tool.execution spans went nowhere, and a
trace held the message with no call under it.

The proxy is restored for the agn path only and given the endpoint
explicitly, so what the workload was handed cannot point agn somewhere
nothing is listening.
@vitramir
vitramir merged commit 495920a into main Sep 1, 2026
2 checks passed
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