# Seer: Debug faster at every stage of development

> Seer is the AI debugger that uses Sentry context to flag breaking changes, automatically root cause issues in production, and fix what you missed.

**URL:** https://sentry.io/product/seer/

---

Seer is Sentry's debugging agent. It turns your telemetry into answers and gets you the fix, right where you're already working.

## Features

### New issue at 2am. PR is ready for review.

When a new issue hits, Seer investigates automatically to find what broke and why.

By the time you open your laptop, there's already a pull request waiting.

### Ask Seer anything.

Not everything starts with a Sentry alert. Sometimes you just know something is… off.

Describe what you're seeing in plain language. Seer pulls the relevant signals and answers the questions that don't have an obvious starting point or solution.

### Debug wherever you work.

Seer doesn't just live in Sentry's UI.

Send fixes to Claude, Copilot, or Cursor.

Fix bugs from a Slack alert.

Start an incident investigation in Slack where your whole team can see what's happening.

## Features

- **Ask Seer Anything**: No context-gathering, no copy-pasting stack traces. Just ask Seer Agent what's wrong and get an answer from your actual production data. — [Learn more](https://sentry.io/product/seer/agent/)

- **Errors come with fixes now.**: Seer Autofix reads the stack trace, traces the root cause through your codebase, and drafts a fix — before you've finished reading the alert. — [Learn more](https://sentry.io/product/seer/autofix/)

- **Catch tomorrow's bugs in today's PR.**: Seer reviews your PRs against real production data — the errors, traces, and failure patterns Sentry has already seen from your app. If your change is going to cause problems, Seer tells you without spamming your PR. — [Learn more](https://sentry.io/product/seer/ai-code-review/)

## FAQ

**How much does Seer cost?**

Seer is available to all Sentry users on a paid plan (Team, Business, or Enterprise) at $40 per active contributor, per month.  An active contributor is anyone who commits two or more PRs in a connected repo.

More details are available in the [Seer pricing docs](https://docs.sentry.io/pricing/#seer-pricing).

**How do I enable Seer?**

All Sentry users on a paid plan or trial can use Seer. You will be prompted to enable Seer and generative AI features within the Sentry interface upon attempting to use them for the first time.

**What issues can Seer fix?**

Seer can fix most bugs and performance issues in your application. Seer includes issue scan, which intelligently tries to determine the likelihood that an issue can be fixed with a code change, and enables you to run Seer on those issues. Alternatively, you can configure Seer to run issue fix automatically on issues that it believes it can help you fix.

**What programming languages does Seer support?**

Seer supports all programming languages and frameworks supported by Sentry, including web (frontend and backend), mobile, and desktop. Virtually all modern programming and configuration languages are supported, and then some more.

**How does Seer protect my data?**

Seer respects your privacy and your data, and it comes with robust guarantees:

AI-generated output from your data is shown only to you, not other customers

Your data is not used to train generative AI models without your express consent (off by default)

We process your data only via [trusted subprocessors](https://sentry.io/legal/subprocessors/) that are not allowed to use your data to train their own models

You can [read more](https://docs.sentry.io/product/ai-in-sentry/ai-privacy-and-security/) in our docs.

**Can I disable Seer and generative AI features in Sentry?**

Teams that want to turn off Seer and generative AI features can go to Settings → Organization → General Settings → Enable Generative AI Features and disable the feature toggle.

## Resources

- [Seer: debug with AI at every stage of development](https://blog.sentry.io/seer-debug-with-ai-at-every-stage-of-development/): Seer already accurately root causes and fixes bugs in production. Now we're expanding its capabilities to help you debug during local development and code review.

- [Seer Docs](https://docs.sentry.io/product/ai-in-sentry/seer/): Learn about Seer, Sentry's AI agent, and managing generative AI features.

- [Seer fixes Seer: How Seer pointed us toward a bug and helped fix an outage](https://blog.sentry.io/seer-fixes-seer-debugging-agent/): How Sentry's AI debugging tool Seer helped identify and fix a cascading region blocklist bug that caused an outage in Seer's own EU deployment.

- [Seer Changelog](https://changelog.sentry.io/changelog/?categories=cmaxs61ka001h5lgk9p052rs5): Stay informed with new features and updates for Seer

- [Debug Faster with Sentry MCP and Claude Code](https://sentry.io/cookbook/debug-with-sentry-mcp-claude-code/): Connect Sentry to Claude Code via MCP so your AI agent can pull issues, read traces and logs, and apply fixes without leaving your editor.

- [Fix Production Issues in Cursor with Sentry MCP + Seer](https://sentry.io/cookbook/fix-issues-sentry-mcp-cursor/): Connect the Sentry MCP server to Cursor to query issues, trigger Seer root cause analysis, investigate database performance, and apply fixes — all without leaving your IDE.

- [Automate Weekly Performance Triage with Claude Code + Sentry MCP](https://sentry.io/cookbook/performance-bot-sentry-claude/): Use Claude Code scheduled tasks and the Sentry MCP server to automatically find your worst performance issues every week and create GitHub PRs with fixes.

## Testimonials

> Seer gives us exactly what we need — straight to the point, fast, and accurate. It’s saved us hours per feature, and that translates to the bottom line.

> — Marc Maciera Zayas, President @Honra

> Sentry [Seer] is actually… good?
One-shot fixed this error that I've spent the last 2 hours debugging

> — @aidenybai, 

> Seer provided insights that led us to a fix within 30 minutes, for a bug that would have taken an engineer at least a day otherwise.

> — Neil Wang, 

> Amazing. @getsentry Seer did better than I would have. I wouldn't have thought to have a special ogType for articles. https://t.co/Y44lHdMitM

> — @kentcdodds, 

## Quick Start

### Python

Install the Sentry Python SDK with pip

```bash
pip install sentry-sdk
```

Configuration should happen as early as possible in your application's lifecycle.

```python
import sentry_sdk

sentry_sdk.init(
  dsn="https://examplePublicKey@o0.ingest.sentry.io/0",
  # Add data like request headers and IP for users, if applicable;
  # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
  send_default_pii=True,
  # Set traces_sample_rate to 1.0 to capture 100%
  # of transactions for tracing.
  traces_sample_rate=1.0,
  #Enable logs to be sent to Sentry
  enable_logs=True,
  # To collect profiles for all profile sessions,
  # set profile_session_sample_rate to 1.0.
  profile_session_sample_rate=1.0,
  # Profiles will be automatically collected while
  # there is an active span.
  profile_lifecycle="trace",
)
```

### JavaScript

Install the Sentry JavaScript SDK with npm

```bash
npm install @sentry/browser --save
```

Configuration should happen as early as possible in your application's lifecycle.

```javascript
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // Adds request headers and IP for users, for more info visit:
  // https://docs.sentry.io/platforms/javascript/configuration/options/#sendDefaultPii
  sendDefaultPii: true,
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for tracing.
  tracesSampleRate: 1.0,
  // Set tracePropagationTargets to control for which URLs trace propagation should be enabled
  tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
  // Enable logs to be sent to Sentry
  enableLogs: true,
  // Set profilesSampleRate to 1.0 to profile every transaction.
  // Since profilesSampleRate is relative to tracesSampleRate,
  // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
  // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
  // result in 25% of transactions being profiled (0.5*0.5=0.25)
  profilesSampleRate: 1.0,
  integrations: [
    Sentry.browserTracingIntegration(),
    Sentry.browserProfilingIntegration(),
  ],
});
```

### React

Run the command for your preferred package manager to add the Sentry SDK to your application:

```bash
npm install @sentry/react --save
```

To import and initialize Sentry, create a file in your project's root directory, for example, `instrument.js`, and add the following code:

```javascript
import * as Sentry from "@sentry/react";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // Adds request headers and IP for users, for more info visit:
  // https://docs.sentry.io/platforms/javascript/guides/react/configuration/options/#sendDefaultPii
  sendDefaultPii: true,
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for tracing.
  // Learn more at
  // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
  tracesSampleRate: 1.0,
  // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
  tracePropagationTargets: [/^//, /^https://yourserver.io/api/],
  // Enable logs to be sent to Sentry
  enableLogs: true,
  // Set profilesSampleRate to 1.0 to profile every transaction.
  // Since profilesSampleRate is relative to tracesSampleRate,
  // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
  // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
  // result in 25% of transactions being profiled (0.5*0.5=0.25)
  profilesSampleRate: 1.0,
  integrations: [
    // If you're using react router, use the integration for your react router version instead.
    // Learn more at
    // https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/
    Sentry.browserTracingIntegration(),
    Sentry.browserProfilingIntegration(),
  ],
});
```

Initialize Sentry as early as possible in your application. We recommend putting the import of your initialization code as the first import in your app's entry point:

```javascript
// Sentry initialization should be imported first!
import "./instrument";
import App from "./App";
import { createRoot } from "react-dom/client";

const container = document.getElementById("app");
const root = createRoot(container);
root.render(<App />);
```

To make sure Sentry captures all your app's errors, configure error handling based on your React version. 
 For React versions 19 and up:  

```javascript
import { createRoot } from "react-dom/client";
import * as Sentry from '@sentry/react';

const container = document.getElementById("app");
const root = createRoot(container, {
  // Callback called when an error is thrown and not caught by an ErrorBoundary.
  onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
    console.warn('Uncaught error', error, errorInfo.componentStack);
  }),
  // Callback called when React catches an error in an ErrorBoundary.
  onCaughtError: Sentry.reactErrorHandler(),
  // Callback called when React automatically recovers from errors.
  onRecoverableError: Sentry.reactErrorHandler(),
});
root.render();
```

For React versions 18 and below, use the ErrorBoundary component to automatically send errors from specific component trees to Sentry and provide a fallback UI:

```javascript
import React from "react";
import * as Sentry from "@sentry/react";

<Sentry.ErrorBoundary fallback={<p>An error has occurred</p>}>
  <Example />
</Sentry.ErrorBoundary>;
```

### Next.js

To install Sentry using the installation wizard, run thrun the following command and step through the prompts:

```bash
npx @sentry/wizard@latest -i nextjs
```

For manual installation run the following command and use the following configurations:

```bash
npm install @sentry/nextjs --save
```

Extend your app's default Next.js options by adding code with `withSentryConfig` into your `next.config.(js|mjs)` file:

```javascript
const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = {
  // Your existing Next.js configuration
};
// Make sure adding Sentry options is the last code to run before exporting
module.exports = withSentryConfig(nextConfig, {
  org: "example-org",
  project: "example-project",
  // Only print logs for uploading source maps in CI
  // Set to `true` to suppress logs
  silent: !process.env.CI,
  // Automatically tree-shake Sentry logger statements to reduce bundle size
  disableLogger: true,
});
```

#### Client-Side Configuration

```javascript
import * as Sentry from "@sentry/nextjs";
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // Adds request headers and IP for users, for more info visit:
  // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
  sendDefaultPii: true,
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for tracing.
  // We recommend adjusting this value in production
  // Learn more at
  // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
  tracesSampleRate: 1.0,
  // Enable logs to be sent to Sentry
  enableLogs: true,
  // Set profilesSampleRate to 1.0 to profile every transaction.
  // Since profilesSampleRate is relative to tracesSampleRate,
  // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
  // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
  // result in 25% of transactions being profiled (0.5*0.5=0.25)
  profilesSampleRate: 1.0,
});

// This export will instrument router navigations, and is only relevant if you enable tracing.
// `captureRouterTransitionStart` is available from SDK version 9.12.0 onwards
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
```

#### Server-Side Configuration

```javascript
import * as Sentry from "@sentry/nextjs";
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // Adds request headers and IP for users, for more info visit:
  // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
  sendDefaultPii: true,
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for tracing.
  // We recommend adjusting this value in production
  // Learn more at
  // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
  tracesSampleRate: 1.0,
  // Enable logs to be sent to Sentry
  enableLogs: true,
});
```

#### Register Sentry Server-Side SDK Initialization

Create a Next.js Instrumentation file named `instrumentation.(js|ts)` in your project root or inside the `src` folder if you have one. Import your server and edge configurations, making sure that the imports point to your specific files:

```javascript
export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    await import("./sentry.server.config");
  }
  if (process.env.NEXT_RUNTIME === "edge") {
    await import("./sentry.edge.config");
  }
}
```

### Go

Grab the Sentry Go SDK:

```bash
go get "github.com/getsentry/sentry-go"
```

Configuration should happen as early as possible in your application's lifecycle.

```text
err := sentry.Init(sentry.ClientOptions{
  Dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // Enable printing of SDK debug messages.
  // Useful when getting started or trying to figure something out.
  Debug: true,
  // Adds request headers and IP for users,
  // visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
  SendDefaultPII: true,
  EnableTracing: true,
  // Set TracesSampleRate to 1.0 to capture 100%
  // of transactions for tracing.
  TracesSampleRate: 1.0,
})
if err != nil {
  log.Fatalf("sentry.Init: %s", err)
}
// Flush buffered events before the program terminates.
// Set the timeout to the maximum duration the program can afford to wait.
defer sentry.Flush(2 * time.Second)
```

### Ruby

Add the sentry-ruby gem to your Gemfile:

```ruby
gem "sentry-ruby"
```

Configuration should happen as early as possible in your application's lifecycle.

```ruby
require 'sentry-ruby'

Sentry.init do |config|
  config.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0'

  # get breadcrumbs from logs
  config.breadcrumbs_logger = [:sentry_logger, :http_logger]

  # Add data like request headers and IP for users, if applicable;
  # see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
  config.send_default_pii = true
  # enable tracing
  # we recommend adjusting this value in production
  config.traces_sample_rate = 1.0
  # Enable logs to be sent to Sentry
  config.enable_logs = true
  # enable profiling
  # this is relative to traces_sample_rate
  config.profiles_sample_rate = 1.0
end
```

### PHP

Install the Sentry SDK using Composer:

```bash
composer require sentry/sentry
```

To use Profiling, you'll also need to install the Excimer extension via PECL:

```bash
pecl install excimer
```

To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible.

```php
\Sentry\init([
  'dsn' => 'https://examplePublicKey@o0.ingest.sentry.io/0',
  // Add request headers, cookies and IP address,
  // see https://docs.sentry.io/platforms/php/data-management/data-collected/ for more info
  'send_default_pii' => true,
  // Specify a fixed sample rate
  'traces_sample_rate' => 1.0,
  // Enable logs to be sent to Sentry
  'enable_logs' => true,
  // Set a sampling rate for profiling - this is relative to traces_sample_rate
  'profiles_sample_rate' => 1.0,
]);
```

### .NET

Install the NuGet package to add the Sentry dependency:

```shell
dotnet add package Sentry -v 5.16.2
```

To use Profiling, you'll also need to install the Sentry.Profiling package:

```shell
dotnet add package Sentry.Profiling -v 5.16.2
```

To capture all errors, even the one during the startup of your application, you should initialize the Sentry .NET SDK as soon as possible.

```csharp
SentrySdk.Init(options =>
{
    options.Dsn = "https://examplePublicKey@o0.ingest.sentry.io/0";
    options.Debug = true;
    // Adds request URL and headers, IP and name for users, etc.
    options.SendDefaultPii = true;
    // A fixed sample rate of 1.0 - 100% of all transactions are getting sent
    options.TracesSampleRate = 1.0f;
    // A sample rate for profiling - this is relative to TracesSampleRate
    options.ProfilesSampleRate = 1.0f;
});
```

---

*Source: [sentry.io/product/seer/](https://sentry.io/product/seer/)*
