Skip to main content
Error Monitoring is the core of Sentry. Every time your application throws an exception or logs an error, Sentry captures it with full context — the stack trace, the user who was affected, the sequence of events that led up to it, and more. You stop guessing and start fixing.

What Sentry captures

When an error occurs, Sentry records:
  • Exceptions — both unhandled crashes and exceptions you explicitly capture
  • Stack traces — with source code context around each frame
  • Breadcrumbs — a timeline of events (navigation, HTTP requests, console logs) that led to the error
  • User context — who was affected, including ID, email, and username
  • Tags and custom context — any additional data you attach at capture time
  • Release and environment — which version of your app was running and in which environment

Instrumenting your code

Use the Sentry SDK to capture errors and attach context.
import * as Sentry from "@sentry/browser";

// Capture an exception
try {
  riskyOperation();
} catch (error) {
  Sentry.captureException(error);
}

// Identify the current user
Sentry.setUser({
  id: "user-123",
  email: "jane@example.com",
  username: "jane",
});

// Add a breadcrumb manually
Sentry.addBreadcrumb({
  category: "auth",
  message: "User logged in",
  level: "info",
});
Most SDKs automatically capture unhandled exceptions without any extra code. Manual captureException calls are for errors you catch yourself but still want to track.

Stack traces with source context

Sentry displays the full call stack at the time of the error. Each frame shows the file, line number, and surrounding source code — so you can see exactly what was executing. If you upload source maps (for JavaScript) or configure debug symbols (for native apps), Sentry maps minified or compiled frames back to your original source code. Breadcrumbs are a trail of events that happened before the error. Sentry automatically records:
  • Navigation events (page changes, route transitions)
  • HTTP requests and their status codes
  • Console log output
  • UI interactions (clicks, form submissions)
  • Prior errors and exceptions
You can also add your own breadcrumbs at any point using addBreadcrumb / add_breadcrumb.

User context

Attach a user to the current scope so Sentry can tell you how many unique users were affected by an issue. You can include any of these fields:
FieldDescription
idA unique identifier for the user
emailThe user’s email address
usernameA display name or handle
ip_addressSet to "{{auto}}" to capture automatically

Tags and custom context

Tags are key-value pairs you can search and filter by. Custom context lets you attach structured data (like a JSON object) that appears in the issue detail.
Sentry.setTag("payment_method", "credit_card");

Sentry.setContext("checkout", {
  cart_id: "abc-123",
  item_count: 5,
  total: 99.99,
});

Issue grouping

Sentry groups similar errors into a single issue so your inbox doesn’t fill up with thousands of individual events. Grouping uses a fingerprint derived from the stack trace and error type. You can customize grouping by:
  • Setting a custom fingerprint on the event
  • Using stack trace rules in your project settings to ignore specific frames
  • Merging issues manually in the UI

Suggested fixes with Sentry AI (Seer)

For issues with enough event history, Sentry’s AI feature Seer analyzes the error, your stack trace, and your codebase to suggest a root cause and a potential fix. Look for the “Fix with Seer” button on any issue detail page.
Seer works best when you’ve connected your source code repository to Sentry. Go to Settings > Integrations to link GitHub, GitLab, or Bitbucket.

Viewing and triaging issues

Navigate to the Issues section in your Sentry project to see all captured errors. From there you can:
  • Filter by environment, release, user, tag, or date range
  • Search using Sentry’s query syntax (e.g. is:unresolved user.email:jane@example.com)
  • Assign issues to teammates or teams
  • Resolve issues when a fix is deployed
  • Ignore issues that are known and acceptable

Source Maps

Upload source maps to see original JavaScript source in stack traces instead of minified code.

Releases

Tag errors with your release version to track which deploy introduced a regression.

Alerts

Set up alert rules to get notified in Slack, email, or PagerDuty when error rates spike.

Ownership Rules

Route issues automatically to the right team based on file paths or URL patterns.