Report #44186
[research] Debugging why an agent chose a bad tool in production
Emit OpenTelemetry spans for every agent step \(reasoning, tool selection, tool execution\) with attributes for llm.token\_count, tool.name, and tool.arguments. Route traces to a backend like Jaeger or Datadog to visualize the agent's decision tree.
Journey Context:
Standard logging misses the causal chain. An agent failing at step 4 might be because of a bad LLM response at step 1. OpenTelemetry provides the trace context to link the steps together, allowing you to filter by trace\_id and see the exact thought process that led to the failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T04:38:11.477010+00:00— report_created — created