SDKs overview

Sentry offers a comprehensive suite of Software Development Kits (SDKs) designed to integrate its error monitoring and performance management services directly into various applications. These SDKs are engineered to capture exceptions, log errors, monitor transaction performance, and provide rich context about application issues as they occur in production environments. The primary goal of Sentry's SDK ecosystem is to equip developers with the tools needed for proactive debugging and performance optimization across a wide array of programming languages and frameworks.

Each SDK is tailored to the conventions and best practices of its respective language or framework, ensuring native integration and minimal overhead. They typically handle tasks such as automatic error reporting, stack trace collection, user context enrichment, and environment data aggregation. Many SDKs also include integrations for specific frameworks, allowing for deeper insights into framework-level errors and performance bottlenecks. For a complete listing of available SDKs and their specific capabilities, the Sentry platform documentation serves as the primary resource.

Official SDKs by language

Sentry maintains official SDKs for a broad spectrum of programming languages and frameworks. These SDKs are developed and supported by the Sentry team, ensuring compatibility with the latest Sentry platform features and adherence to language-specific standards. The following table provides an overview of key official SDKs, their package names, common installation commands, and their general maturity level as of 2026.

Language/Framework Package Name Installation Command (Example) Maturity
Python sentry-sdk pip install sentry-sdk Stable
JavaScript (Browser) @sentry/browser npm install @sentry/browser Stable
Node.js @sentry/node npm install @sentry/node Stable
Java sentry-java Maven: <dependency><groupId>io.sentry</groupId><artifactId>sentry</artifactId><version>X.Y.Z</version></dependency> Stable
Ruby sentry-ruby gem install sentry-ruby Stable
PHP sentry/sentry composer require sentry/sentry Stable
Go sentry-go go get github.com/getsentry/sentry-go Stable
C# / .NET Sentry dotnet add package Sentry Stable
Rust sentry cargo add sentry Stable
Swift / Objective-C Sentry CocoaPods: pod 'Sentry' Stable
Kotlin / Android sentry-android Gradle: implementation 'io.sentry:sentry-android:X.Y.Z' Stable
Flutter sentry_flutter flutter pub add sentry_flutter Stable
React Native @sentry/react-native npm install @sentry/react-native Stable
Vue @sentry/vue npm install @sentry/vue Stable
Angular @sentry/angular npm install @sentry/angular Stable
Next.js @sentry/nextjs npm install @sentry/nextjs Stable
Svelte @sentry/svelte npm install @sentry/svelte Stable
Laravel sentry/sentry-laravel composer require sentry/sentry-laravel Stable
Django sentry-sdk (integrated) pip install sentry-sdk django Stable
Rails sentry-ruby (integrated) gem install sentry-ruby rails Stable
ASP.NET Sentry.AspNetCore dotnet add package Sentry.AspNetCore Stable
Spring Boot sentry-spring-boot-starter Gradle: implementation 'io.sentry:sentry-spring-boot-starter:X.Y.Z' Stable

For detailed setup instructions and advanced configurations for each platform, developers should refer to the Sentry platform-specific documentation.

Installation

Installing a Sentry SDK typically involves adding the relevant package to your project's dependencies and then initializing the SDK with your unique Data Source Name (DSN). The DSN acts as a private key and URL that tells the SDK where to send event data. Installation methods vary by language and ecosystem, but generally follow package manager conventions.

General Steps:

  1. Add the SDK package: Use your language's package manager (e.g., npm, pip, composer, go get, Maven, Gradle, Cargo, CocoaPods) to include the Sentry SDK in your project.
  2. Initialize the SDK: Import the SDK and call its initialization function early in your application's lifecycle. This function requires your DSN and can accept various configuration options, such as release versions, environment names, and sampling rates.
  3. Configure Integrations (Optional but Recommended): Many SDKs offer framework-specific integrations that automatically capture more context, such as HTTP request data for web applications or component lifecycles for UI frameworks.
  4. Verify Installation: Trigger a test error or transaction to confirm that data is being sent to your Sentry project.

For example, a JavaScript application might use npm to install @sentry/browser, while a Python application would use pip install sentry-sdk. Detailed installation instructions for each platform are available in the Sentry Developer Documentation.

Quickstart example

Below is a quickstart example demonstrating how to integrate Sentry into a basic Node.js application. This example shows the installation of the SDK, its initialization, and how to manually capture an error. Your DSN (Data Source Name) is crucial for connecting your application to your Sentry project; replace YOUR_SENTRY_DSN with your actual DSN found in your Sentry project settings.

Node.js Quickstart

# Install the Sentry Node.js SDK
npm install @sentry/node express
// app.js
const Sentry = require("@sentry/node");
const express = require("express");

const app = express();

Sentry.init({
  dsn: "YOUR_SENTRY_DSN",
  // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
  // We recommend adjusting this value in production.
  tracesSampleRate: 1.0,
});

// The request handler must be the first middleware on the app
app.use(Sentry.Handlers.requestHandler());

// TracingHandler creates a trace for every incoming request
app.use(Sentry.Handlers.tracingHandler());

app.get("/", function rootHandler(req, res) {
  res.end("Hello world!");
});

app.get("/debug-sentry", function mainHandler(req, res) {
  throw new Error("My first Sentry error!");
});

// The error handler must be before any other error middleware and after all controllers
app.use(Sentry.Handlers.errorHandler());

// Optional fallthrough error handler
app.use(function onError(err, req, res, next) {
  // The error id is attached to `res.sentry` to be returned to the client
  // for feedback and for tracing. Only available with Sentry.Handlers.errorHandler().
  res.statusCode = 500;
  res.end(res.sentry + "\n");
});

app.listen(3000, () => {
  console.log("Server is running on port 3000");
});

After running this application and navigating to /debug-sentry, an error will be captured by Sentry and reported to your project. This minimal example demonstrates how to set up error tracking and integrate with a common web framework like Express. Further details on configuring performance monitoring and other features are available in the Sentry Express.js documentation.

Community libraries

While Sentry provides a robust set of official SDKs, the open-source nature of the project has fostered a community that contributes additional integrations and libraries. These community-maintained projects can extend Sentry's functionality to niche frameworks, specific tools, or provide alternative ways to integrate with the Sentry API. Such libraries are often listed and sometimes linked from the official Sentry documentation, but their support and maintenance levels can vary. Developers considering community libraries should review their documentation, issue trackers, and contribution activity to assess their suitability for production use.

For example, developers working with less common frameworks or specific data processing pipelines might find community-contributed wrappers or adapters. The Sentry team often highlights notable community contributions on their official blog or through their documentation. Additionally, platforms like GitHub serve as a common repository for these community-driven projects, where developers can explore various integrations by searching for "sentry" alongside their desired technology. It is important to note that while some community libraries are highly stable and widely used, they may not receive the same level of official support or timely updates as Sentry's core SDKs.