Sentry Cookbook
Code breaks. These recipes fix it.
Recipes
Instrument Flue agents with Sentry
Use Flue's official Sentry blueprint to trace agent runs, inspect tool calls, correlate logs, and capture terminal failures.
Instrument Vercel eve agents with Sentry
Use Vercel eve's official Sentry instrumentation to send agent traces directly to Sentry over OTLP. No Sentry SDK is required.
Monitor AI agent spend with dashboards and alerts
Build a shared Sentry dashboard for AI agent cost, tokens, and top spenders, then get alerted when hourly spend breaches your budget or spikes. The dashboard the script builds is literally 'LLM Spend per User'.
Monitor Neon Functions with Sentry
Add error tracking, structured logs, request tracing, and AI agent observability to your Neon Functions with the standard Sentry Node SDK — no wrapper or special runtime required.
Structure your logs for faster debugging
Replace noisy console.log and print statements with structured, queryable log events — stable event names, dot-notated keys, and context that travels with every request — so the data you need to debug a failure is already there.
Automate daily AI agent error triage with Claude Routines and Sentry
A Claude Routine reads your agent's overnight conversations, flags tool errors and reasoning failures, and files tickets before you've had your coffee.
Investigate and fix issues with Seer Agent
Ask Seer Agent what broke and why in plain language, in Sentry or Slack, and it reasons over your errors, traces, logs, and code to find the root cause, then kicks off a fix.
Build a dashboard and alert from custom metrics in a Next.js app
Emit one custom metric from a Next.js Server Action, then turn it into a dashboard widget and a threshold or anomaly alert that fires the moment things drift — trace-connected, so a spike is one click from the request behind it.
Use production AI agent conversations in your evals
Export your users' real AI agent conversations from Sentry and turn them into eval datasets you score in Braintrust, Langfuse, promptfoo, or Phoenix. Real traffic becomes your ground-truth test set.
Install the Sentry plugin in your coding agent
One command installs the Sentry plugin in your coding agent, so it can set up Sentry, fix errors, configure alerts, and more.
Connect your GitLab source code to Sentry
Connect GitLab to Sentry so errors point straight at the code that caused them. You'll create an application in GitLab, link groups, and add repositories to unlock code mapping, stack trace linking, and Seer.
Build an automated debugging workflow with Seer
Let Sentry help fix issues for you. Sentry captures issues with full context of your application, Seer pinpoints the root cause, and ships the fix as a pull request using Seer or the agent of your choice. All done automatically or with a human in the loop, whatever works for you.
Debug and resolve issues with Sentry MCP and Warp
Connect the Sentry MCP server to Warp so your AI terminal agent can pull issues, read traces and logs, call Seer for a root-cause analysis, and apply the fix.
Analyze and fix issues from Slack with Seer
Use the Sentry Slack integration to query the Seer agent, trigger Autofix from alert notifications, and debug issues without leaving Slack.
Turn Supabase security advisories into Sentry issues
Use the Supabase and Sentry MCP servers in Claude Code to turn security advisories (like missing RLS policies) into trackable Sentry issues, then schedule the check to run daily.
Set up a monitor and alert from a Supabase log drain
Pipe your Supabase infrastructure logs into Sentry, then filter, monitor, and alert on dropped database connections and edge-function errors — without babysitting the Supabase dashboard.
Auto-create and triage issues in Linear for your worst bugs
Use the Sentry Linear integration to auto-create a Linear issue the moment an error fires, then assign the Sentry agent to run root cause analysis and suggest a code fix, all without leaving Linear.
Auto-fix regressed Sentry issues with Cursor Automations
When a resolved Sentry issue resurfaces, a Cursor agent investigates the regression vector, reads the relevant code, and opens a PR — no manual triage needed.
Auto-triage and fix User Feedback with Cursor Automations and Sentry MCP
Trigger a Cursor agent the moment user feedback is assigned in Sentry. It reads the issue, finds the relevant code, and opens a PR.
Automate weekly performance triage with Claude Code + Sentry MCP
Set up a recurring Claude Code task that queries Sentry for your slowest endpoints every Monday, analyzes the root cause, and opens a GitHub PR with the fix. No custom bot infrastructure required.
Catch bugs in pull requests before they reach production with Seer
Connect Sentry to GitHub and Seer runs AI code review on every pull request, flagging real bugs before they merge, using your actual production error data instead of style nitpicks.
Create Sentry Dashboards with your AI coding agent
Point your AI coding agent at the Sentry CLI and it builds dashboards tailored to your codebase, with no manual widget configuration required.
Debug faster with Sentry MCP and Claude Code
Connect Sentry to Claude Code with the Sentry MCP server so your AI coding agent can pull issues, read traces and logs, find the root cause, and apply the fix.
Debug undefined properties in React Native with Sentry Logs
Use Sentry Logs from both your React Native app and backend to tell whether an undefined property is a first-render timing issue or actually missing from the API response — no more guessing.
Fix production issues in Cursor using the Sentry MCP server and Seer
Use the Sentry MCP server in Cursor to pull issues from your projects, trigger Seer root cause analysis, and apply fixes directly in your IDE — no copy-pasting stack traces required.
Monitor Claude Code usage and costs with Sentry
Add the claude-code-sentry-monitor plugin to track token usage, session costs, and tool activity across every Claude Code session, without touching your project code.
Monitor your AI agent costs and calls in Next.js
Add Sentry to your Next.js app to see Vercel AI SDK token usage, LLM costs, tool calls, and agent traces with full-stack trace context. Spot which models drive spend without leaving Sentry.
Monitor your MCP server with Sentry
Wrap your MCP server with a single function call to get full visibility into client activity, transport distribution, tool and resource performance, and errors — including the silent ones MCP hides from you.
Monitor your OpenCode sessions with Sentry
Add the opencode-sentry-monitor plugin to get full visibility into tool calls, token usage, and model costs across every OpenCode session.
Monitor your pi coding agent sessions with Sentry
Add the pi-sentry-monitor extension to get full visibility into tool calls, token usage, and model costs across every pi session.
Replace console.log with structured, trace-connected logging using LogTape and Sentry
Wire up LogTape with Sentry in a Next.js app to replace console.log with structured, trace-connected log events you can query, alert on, and tie back to the exact request that broke.
Route your existing OpenTelemetry traces to Sentry with Next.js
Keep your vendor-neutral OpenTelemetry instrumentation and start seeing your Next.js traces in Sentry. No SDK migration required.
Send Vercel AI SDK telemetry to Sentry via OpenTelemetry
Keep your existing Vercel AI SDK and OpenTelemetry setup, and route LLM spans to Sentry's AI Agents Insights without ripping out @vercel/otel.
Track and fix checkout performance in React Native with Sentry tracing
Instrument tracing across a React Native app and Python backend to pinpoint the slow HTTP requests in your checkout flow, fix them, and set up alerts and dashboards that catch the next regression.
Write incident playbooks in Sentry Dashboards using markdown widgets
Put your incident runbook inside a Sentry dashboard as a markdown text widget, so on-call sees the triage steps right next to the metrics they reference.
No recipes match your filters.
Fix it
Get started with the only application monitoring platform that empowers developers to fix application problems without compromising on velocity.