Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 10, 2026·3 min de lecture

Sentry — Open Source Error Tracking & Performance Monitoring

Sentry is the developer-first error tracking and performance monitoring platform. Capture exceptions, trace performance issues, and debug production errors across all languages.

Introduction

Sentry is the leading error tracking and performance monitoring platform for developers. It captures unhandled exceptions, tracks performance bottlenecks, monitors releases, and provides the context needed to debug production issues — all with SDKs for 100+ languages and frameworks.

With 43.5K+ GitHub stars, Sentry is used by millions of developers at organizations from startups to Fortune 500 companies. The self-hosted version provides the full Sentry experience on your own infrastructure.

What Sentry Does

  • Error Tracking: Capture and group unhandled exceptions with full stack traces
  • Performance Monitoring: Trace transactions across services with latency breakdowns
  • Session Replay: Replay user sessions to see exactly what happened before an error
  • Release Tracking: Track error rates per release, detect regressions automatically
  • Source Maps: Unminify JavaScript errors with automatic source map processing
  • Alerts: Configurable alert rules for error spikes, new issues, and performance degradation
  • Issue Assignment: Auto-assign issues to code owners based on stack trace
  • Integrations: GitHub, GitLab, Jira, Slack, PagerDuty, and 50+ integrations
  • Breadcrumbs: Automatic event trail leading up to each error (clicks, API calls, console logs)

SDK Examples

JavaScript/Node.js

const Sentry = require("@sentry/node");
const { nodeProfilingIntegration } = require("@sentry/profiling-node");

Sentry.init({
  dsn: "https://your-dsn@sentry.io/project",
  integrations: [nodeProfilingIntegration()],
  tracesSampleRate: 0.1,
  profilesSampleRate: 0.1,
});

// Errors are captured automatically
// Manual capture:
try {
  riskyOperation();
} catch (error) {
  Sentry.captureException(error);
}

// Add context
Sentry.setUser({ id: "user123", email: "user@example.com" });
Sentry.setTag("feature", "checkout");

Python

import sentry_sdk

sentry_sdk.init(
    dsn="https://your-dsn@sentry.io/project",
    traces_sample_rate=0.1,
)

# Auto-captures unhandled exceptions
# Django, Flask, FastAPI auto-instrumented

# Manual capture
try:
    process_payment(order)
except PaymentError as e:
    sentry_sdk.capture_exception(e)
    sentry_sdk.capture_message("Payment failed for order %s" % order.id)

Go

import "github.com/getsentry/sentry-go"

func main() {
    sentry.Init(sentry.ClientOptions{
        Dsn: "https://your-dsn@sentry.io/project",
        TracesSampleRate: 0.1,
    })
    defer sentry.Flush(2 * time.Second)
}

Self-Hosting

Requirements

  • Docker 19.03+ and Docker Compose 2.19+
  • 8GB RAM minimum (16GB recommended)
  • 20GB disk space

Docker Compose

git clone https://github.com/getsentry/self-hosted.git
cd self-hosted
./install.sh  # Interactive setup
docker compose up -d

Components deployed:

  • Sentry Web (Django)
  • Sentry Worker (Celery)
  • Sentry Cron
  • PostgreSQL
  • Redis
  • Kafka
  • ClickHouse
  • Snuba (query engine)
  • Symbolicator (source maps)
  • Relay (event ingestion)

Key Features

Issue Grouping

Sentry automatically groups similar errors:

Issue: TypeError: Cannot read property 'name' of undefined
├── 1,234 events
├── 56 users affected
├── First seen: 2 days ago
├── Last seen: 5 minutes ago
├── Stack trace with source context
├── Breadcrumbs (30 events before crash)
├── Tags: browser=Chrome, os=Windows, release=v2.1.0
└── Linked commits (suspect commits)

Performance Tracing

Transaction: POST /api/checkout (p50: 450ms, p95: 1.2s)
├── HTTP Handler (12ms)
├── Auth Middleware (5ms)
├── Validate Cart (8ms)
├── DB: SELECT products (45ms)
├── Payment API Call (380ms) ← bottleneck
├── DB: INSERT order (15ms)
├── Send Email (async)
└── Response (465ms total)

Release Health

Release v2.1.0:
├── Crash-free sessions: 99.2% (↓ from 99.8%)
├── Crash-free users: 98.5%
├── New issues: 3
├── Regressed issues: 1
├── Adoption: 45% of users
└── Suspect commits: abc1234 by @developer

Sentry vs Alternatives

Feature Sentry Datadog New Relic GlitchTip Bugsnag
Open Source Yes No No Yes No
Self-hosted Yes No No Yes No
Error tracking Excellent Good Good Basic Good
Performance APM + Profiling Full APM Full APM No No
Session replay Yes Yes Yes No No
SDKs 100+ 15+ 15+ Sentry-compat 15+
Pricing Free (self-host) $15/host $0.30/GB Free $99/mo

FAQ

Q: Is self-hosted Sentry resource-intensive? A: Yes — a full Sentry deployment includes Kafka, ClickHouse, PostgreSQL, and other components, requiring at least 8 GB RAM. For small teams, consider the lightweight alternative GlitchTip (Sentry-compatible but with much lower resource needs).

Q: Does the self-hosted version have the same features as SaaS? A: Core functionality (error tracking, performance monitoring, alerting) is identical. The SaaS edition adds advanced features like Session Replay and Cron Monitoring, plus better scalability and zero maintenance.

Q: Does performance degrade at high data volumes? A: The self-hosted version should use event sampling (tracesSampleRate) to control data volume. For high-traffic apps, sampling rates of 0.01–0.1 give enough insight. The ClickHouse backend keeps query performance strong.

Sources & Credits

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires