Debug AI agents wherever they run, from Slack bots to code review with Sentry's Agent Tracing
Agent Tracing shows the full execution path of an AI agent: the model call, every tool invocation and its arguments, token counts, cost, and the span where it broke. Same traces and spans you already use, with agent-specific attributes on top.
Serge walks through three apps — a Next.js e-commerce agent using the AI SDK with a failing tool call, a Slack bot built with Eve that orders lunch, and a code review agent built with Flue over MCP.
Covered here
- AI SDK generateText calls as traces, spans, and tool calls
- The Agents view: conversations by cost, message volume, and individual chats
- Finding a failed tool call in a conversation that returned a clean response
- Dashboards for token usage, model breakdowns, and your most expensive conversations
- Adding instrumentation so traces show up
- Alerting on anomalies before the invoice does it for you
Demo code
https://github.com/getsentry/sentry-agent-tracing-examples
Frameworks in the demos
Eve: https://eve.dev
Flue: https://flueframework.com
0:00 Introduction to agent tracing
0:40 AI SDK generateText mapped to spans and traces
2:01 Next.js e-commerce agent: failed tool call in a trace
3:53 Agents view: cost, tokens, and model dashboards
4:22 Instrumenting an agent with the Sentry SDK
5:10 Slack bot meal ordering workflow with Eve
7:31 Anomaly detection and alerts
9:08 Code review agent with Flue and MCP
Try Sentry for free: https://sentry.io/welcome
Docs: https://docs.sentry.io