Five things you can do with Sentry’s Agent Tracing
Sentry's Agent Tracing captures model calls, tool executions and multi-agent handoffs in a single trace, and Sentry Cookbook recipes build workflows on top of that data. One recipe exports production conversations with `sentry agent-conversation list` (CLI 0.44+), maps them to eval records, upserts them into Braintrust, Langfuse, promptfoo or Arize Phoenix, and scores them with deterministic checks plus an LLM judge reserved for subjective quality. Practical traps it calls out: summing tokens from raw `gen_ai.invoke_agent` spans double-counts, the CLI defaults to only 25 conversations over 7 days, and recorded prompts may contain PII. A second recipe runs a daily Claude scheduled task that uses the Sentry MCP server to triage agent failures and file Linear tickets.
Related posts
- Search agent traces by behavior with AI Search in LangSmith
LangChain mediumAdeptLangSmith's AI Search lets users find agent traces by behavior described in plain language (e.g. "did PII leak?", "did the user get frustrated?") by running a fast decision model over each candidate trace rather than relying on lossy embedding-based vector search. SmithDB normalizes traces from different SDKs into deduplicated per-session trajectories, which are then packed into an 8K-token budget that prioritizes user messages and agent replies over tool output. In a sample of Open SWE conversations, the median had 72K tokens but only about 2K came from user and agent messages, while roughly 85% was tool output. Structured filters narrow candidates first, then batches are classified in parallel with prefetching and results streamed back as they match.
- Tracing OpenAI agents with ClickStack
ClickHouse mediumAdept
OpenAI's agents SDK has built-in tracing that can be redirected from OpenAI's hosted product to a custom TracingExporter. Spans can then be written into ClickHouse and explored in HyperDX as part of ClickStack. The worked example uses a gpt-5-mini agent that queries the ClickHouse SQL Playground through the ClickHouse MCP Server. The exporter is attached via a BatchTraceProcessor, adds the missing model name to response spans, and inserts rows into a JSON-typed ClickHouse table. The traces show tool calls, failed SQL attempts and LLM responses, which helps when comparing how different models handle ambiguous instructions.
- Debugging our AI search assistant with agent tracing
Sentry mediumAdeptSentry's Search Query Assistant converts natural-language prompts into Sentry Search Syntax, and its team relies on evals plus agent tracing to debug wrong outputs. One bug made queries on custom numeric attributes return nothing. Tracing the conversation's system prompt, LLM generations and tool calls through to the backend API trace showed the prompt listed fields by bare name (e.g. bug__predictions_count) instead of the required tags[name, number] form. The team turned that finding into a new eval, fixed the bug, confirmed the fix in production traces, and now sends local eval runs to Sentry too.
- Building Sentry's Laravel AI Integration
Sentry mediumAdeptSentry's Laravel AI integration, shipped in sentry-laravel 4.27, adds Agent Tracing to Laravel AI agents with no code changes. Because PHP can't easily wrap or patch functions, it hooks Laravel AI's agent and tool lifecycle events, then derives per-LLM Chat spans from Laravel's HTTP client events. Outgoing request URLs are matched against each active invocation's provider URL prefix, and the most recently started invocation wins when several match. Built during a hackweek with Claude, the work also surfaced AI-generated overly defensive PHP that ignored Laravel's typed event shapes.
- Trace & Evaluate your Agent with Arize Phoenix
Hugging Face mediumAdeptA smolagents CodeAgent with DuckDuckGo search and webpage tools can be instrumented with OpenTelemetry and OpenInference so every agent call is traced in a local or hosted Arize Phoenix instance. Evaluation works by querying the search tool's spans with SpanQuery and scoring query/result relevance with GPT-4o as an LLM judge via llm_classify and the RAG relevancy template. The scores are then logged back to Phoenix as span evaluations. Swapping in other prebuilt templates covers checks such as hallucination, toxicity, SQL generation and function calling.