Sentry Cookbook

Code breaks. These recipes fix it.

Recipes

Monitoring | Intermediate | 15 minutes

Instrument Flue agents with Sentry

Use Flue's official Sentry blueprint to trace agent runs, inspect tool calls, correlate logs, and capture terminal failures.

AI ObservabilityAgent TracingLogsIssuesTracing
Monitoring | Beginner | 10 minutes

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.

AI ObservabilityAgent TracingTracing
Monitoring | Intermediate | 20 minutes

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

AI ObservabilityAgent TracingDashboardsAlertsCLIAPI
Monitoring | Intermediate | 15–20 minutes

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.

Error MonitoringLogsTracingAgent TracingAI Observability
Workflow | Intermediate | 30-40 minutes

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.

Logs
Monitoring | Intermediate | 15-20 minutes

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.

Agent TracingSentry MCPAI Observability
Debugging | Beginner | 10–15 minutes

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.

SeerError MonitoringTracingLogsIssues
Monitoring | Intermediate | 20-25 minutes

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.

MetricsDashboardsAlerts
Workflow | Advanced | 30-45 minutes

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.

AI ObservabilityTracingCLIAgent TracingAPI
Workflow | Beginner | 5 minutes

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.

Sentry MCPSeerError MonitoringInstrumentation
Workflow | Beginner | ~5-10 minutes

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.

ReleasesSeerCLIIssues
Workflow | Intermediate | 20–30 minutes

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.

SeerError MonitoringTracingSentry MCPIssues
Debugging | Beginner | 10–15 minutes

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.

Sentry MCPError MonitoringIssuesLogsSeerTracing
Debugging | Beginner | ~10 minutes

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.

SeerIssuesAlerts
Workflow | Intermediate | 15–20 minutes

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.

Sentry MCPIssues
Monitoring | Intermediate | 15-20 minutes

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.

LogsAlerts
Workflow | Beginner | ~15 minutes

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.

IssuesAlertsSeerCLI
Workflow | Intermediate | 20–30 minutes

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.

Sentry MCPIssues
Workflow | Intermediate | 20–30 minutes

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.

Sentry MCPUser Feedback
Workflow | Beginner | 15-20 minutes

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.

Sentry MCPPerformanceTracingSeerIssues
Debugging | Beginner | ~10 minutes

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.

SeerAI Code Review
Workflow | Beginner | 10-15 minutes

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.

DashboardsCLI
Debugging | Beginner | 10–15 minutes

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.

Sentry MCPError MonitoringIssuesLogsSeerTracing
Debugging | Intermediate | 15-20 minutes

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.

LogsSession ReplayTracingIssues
Debugging | Beginner | 10-15 minutes

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.

Sentry MCPSeerTracingError MonitoringIssues
Monitoring | Beginner | 10 minutes

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.

TracingAI ObservabilityAgent Tracing
Monitoring | Beginner | 15–20 minutes

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.

AI ObservabilityTracingAgent Tracing
Monitoring | Beginner | 10-15 minutes

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.

AI ObservabilityTracingError MonitoringIssues
Monitoring | Beginner | 10 minutes

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.

AI ObservabilityAgent TracingTracing
Monitoring | Beginner | 10 minutes

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.

TracingAI ObservabilityAgent Tracing
Debugging | Intermediate | 20-30 minutes

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.

LogsTracingAlertsDashboards
Workflow | Beginner | 15–20 minutes

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.

Tracing
Monitoring | Intermediate | 15–20 minutes

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.

TracingAI ObservabilityAgent Tracing
Performance | Intermediate | 20-30 minutes

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.

TracingAlertsDashboards
Workflow | Beginner | 3 minutes

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.

Dashboards

Fix it

Get started with the only application monitoring platform that empowers developers to fix application problems without compromising on velocity.