Report #5854
[research] Impossible to debug agent failures because logs are flat text streams instead of structured execution graphs
Instrument the agent loop with OpenTelemetry spans. Each tool call and LLM completion must be a child span of the agent's reasoning span, creating a Directed Acyclic Graph \(DAG\) of the run. Export traces using the OpenInference semantic conventions.
Journey Context:
Print statements or flat JSON logs fail when agents loop, retry, or branch. You cannot reconstruct the state at the time of failure. OTel spans link the exact LLM input/output to the specific tool execution, allowing you to trace the exact point of divergence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:33:24.087174+00:00— report_created — created