Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Sentry 4 min read Case study mediumAdept

Debugging our AI search assistant with agent tracing

Sentry'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.

Related posts

  • Five things you can do with Sentry’s Agent Tracing

    Sentry mediumAdept

    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.

  • Search agent traces by behavior with AI Search in LangSmith

    LangChain mediumAdept

    LangSmith'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.

  • The 3 Levels of Debugging With AI

    Neon mediumAdept

    AI-assisted debugging falls into three levels: pasting raw errors into an LLM ("lazy prompting"), writing structured bug-report-style prompts with code, environment, expected vs. actual behavior, and attempts so far, and agents that drive real debuggers. Lazy prompting suits shallow bugs with clear stack traces but risks generic or hallucinated fixes, while structured prompts reduce hallucinations and force you to reason about the bug. Microsoft's debug-gym lets agents set pdb breakpoints, inspect variables and write tests inside Docker sandboxes, lifting o1-preview from 10.7% to 30.2% and Claude 3.7 Sonnet from 37.2% to 48.4% on SWE-bench Lite. Recommended practices include time-boxing, verifying fixes, sandboxing agents, logging their actions and keeping humans in the review loop.

  • Trace & Evaluate your Agent with Arize Phoenix

    Hugging Face mediumAdept

    A 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.

  • Automating Security Triage with HackerOne and Deep Search

    Sourcegraph easyNovice

    Sourcegraph's security team built a small service that receives signed HackerOne webhooks for new bug bounty reports, verifies the signature, and sends the report to the Deep Search API to investigate it against the relevant codebase. The service posts a team-only comment back with a validity verdict, severity, links to affected code, suggested fixes and a link to the Deep Search conversation, and in one case it surfaced a separate critical config-override logic flaw that the reporter had not mentioned. Known risks are reporters driving token consumption, wrong repository mapping and prompt injection in report text. Mitigations include entitlement-based rate limits, invite-only programs, explicit service-to-repo mappings in the prompt and tagging untrusted input.

The quest for software engineering knowledge.

Look:
Layout: