Tracing Claude Code sessions with OpenTelemetry to see what happens between prompts

The AGNT5 team, which builds a platform for running AI agents and workflows, used Claude Code daily but could not see why some sessions were slow or produced unexpected results. They enabled Claude Code's OpenTelemetry tracing, which records each prompt, model call, and tool call. The traces revealed Claude repeatedly checking package versions online from the shell, which the team fixed by adding one line telling Claude to use the versions in the skill file. The article explains how to run Jaeger locally to store and view the traces, and how to configure Claude Code to export them. It also describes the span structure and attributes that can be used to answer questions about a session.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in