Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sentrydocs.dev/llms.txt

Use this file to discover all available pages before exploring further.

Sentry SDKs integrate directly into your application and capture errors, performance data, session replays, and profiles. When an event occurs, the SDK serializes it and sends it to Sentry via your project DSN.

What SDKs capture

  • Errors and exceptions — unhandled crashes and manually captured errors
  • Performance traces — transactions, spans, and distributed traces across services
  • Session replays — video-like recordings of user sessions (browser SDKs)
  • Profiles — CPU and memory flamegraphs tied to transactions
  • Breadcrumbs — a trail of events leading up to an error (clicks, navigation, requests)

Common configuration options

Every Sentry SDK shares a core set of configuration options regardless of language or framework.
OptionTypeDescription
dsnstringYour project’s Data Source Name. Required.
environmentstringLogical environment name, e.g. "production" or "staging".
releasestringVersion string for your app, e.g. "my-app@1.0.0".
sampleRatefloatFraction of error events to send. 1.0 sends all errors.
tracesSampleRatefloatFraction of transactions to send for performance monitoring.
profilesSampleRatefloatFraction of profiled transactions. Requires tracesSampleRate.
replaysSessionSampleRatefloatFraction of sessions to record as replays.
replaysOnErrorSampleRatefloatFraction of sessions to record when an error occurs.
debugbooleanEnable verbose SDK logging to the console.
beforeSendfunctionCallback to inspect, modify, or drop events before they are sent.
sampleRate, tracesSampleRate, and the other rate options accept values between 0.0 (send nothing) and 1.0 (send everything). Start with 1.0 during development and reduce in production if volume is a concern.

Available SDKs

JavaScript / TypeScript

Browser, Node.js, React, Next.js, Vue, Angular, Svelte, SvelteKit, Remix, Astro, Ember, and more.

Python

Django, Flask, FastAPI, Celery, SQLAlchemy, AIOHTTP, Starlette, and more.

Java / Kotlin

Plain Java, Kotlin, Spring Boot, Android (via sentry-android).

Mobile

iOS (Swift / Objective-C), Android (Java / Kotlin), and React Native.

Go

Native Go SDK with integrations for Gin, Echo, Iris, and more.

Ruby

Rails, Sidekiq, Delayed::Job, and Rack.

PHP

Laravel, Symfony, and plain PHP.

.NET

ASP.NET Core, Blazor, MAUI, WPF, Unity, and more.

Rust

Native Rust applications with sentry crate.

Dart / Flutter

Flutter apps for Android, iOS, Web, and Desktop.

Quick setup pattern

All SDKs follow the same basic setup pattern:
1

Install the package

Add the Sentry SDK for your language or framework using your package manager.
2

Call init early

Initialize Sentry as early as possible in your application’s startup — before any other code runs. This ensures errors during startup are captured.
3

Set environment and release

Pass environment and release so you can filter events in Sentry and track which version introduced a bug.
4

Verify the integration

Throw a test exception to confirm events appear in your Sentry project.