sentry-sdk

The official Python SDK for Sentry error tracking, performance monitoring, and tracing.

SDK
PyPI
v2.73.0
2,217 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
96 /100 Excellent
Development Activity 100
Maintenance 96
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 87
Code Quality 88
Innovation 82
Learning Curve 78

sentry-sdk is the official client library for reporting errors, performance data, and traces from Python applications to Sentry.io (or a self-hosted Sentry instance). It automatically captures unhandled exceptions, breadcrumbs, and stack traces, and enriches every event with request, user, and environment context.

Beyond crash reporting, the SDK ships distributed tracing, profiling, session-replay hooks, and cron/job monitoring, plus more than 80 framework integrations (Django, Flask, FastAPI, Celery, AWS Lambda, and others) that auto-instrument common entry points with minimal setup — typically a single sentry_sdk.init() call.

What You Get

  • Automatic unhandled-exception capture with stack traces, local variables, and breadcrumbs
  • Distributed tracing and performance monitoring via start_transaction/start_span, propagated across service boundaries
  • 80+ framework integrations (Django, Flask, FastAPI, Celery, RQ, AWS Lambda, gRPC, and more) that auto-instrument on init()
  • Built-in PII scrubbing (scrubber.py) to redact sensitive data before events leave the process
  • Cron/job monitoring via the crons module for tracking scheduled task health
  • Configurable sample rates, before_send/before_send_transaction hooks, and release/environment tagging

Common Use Cases

  • Capturing and triaging unhandled exceptions in a production web application or API service
  • Tracing slow requests across a microservice boundary to find the root cause of latency
  • Monitoring the health and duration of scheduled/cron jobs and alerting on missed or failed runs
  • Correlating errors with releases and deploys to catch regressions immediately after shipping

Under The Hood

Architecture The SDK is organized around client.py (event construction and transport dispatch), scope.py/hub.py (the context-propagation layer that attaches tags/user/breadcrumbs to whatever is captured next), and tracing.py/traces.py (span/transaction lifecycle for performance monitoring). The 82-module integrations/ package is the largest part of the codebase by file count — each integration hooks a specific framework’s request lifecycle (e.g. Django middleware, Flask signals, Celery task hooks) to automatically start/stop spans and capture exceptions without user code changes. Batching modules (_log_batcher.py, _span_batcher.py, _metrics_batcher.py) buffer and flush telemetry asynchronously to envelope.py/transport.py for network delivery.

Tech Stack Pure Python core with certifi and urllib3 for transport; individual integrations declare their own optional dependencies (Django, Flask, Celery, etc.) so the base install stays lightweight. Uses uv/tox/tox-uv for multi-version testing across the many supported framework versions, ruff for linting, and mypy for type checking (opt-in via a typing dependency group).

Code Quality Very large, framework-specific test suite under tests/ mirroring the integrations/ layout, run across a wide Python/framework version matrix via tox (tox.ini), which is essential given the SDK must support dozens of third-party libraries at multiple versions simultaneously. Uses codecov.yml for coverage tracking and renovate.json for automated dependency updates. The repo also documents its own AI-agent conventions (AGENTS.md, CLAUDE.md), reflecting an actively maintained, process-heavy engineering culture.

API Design The dominant pattern is single-call setup (sentry_sdk.init(dsn=..., integrations=[...])) after which instrumentation is largely implicit — errors and spans are captured automatically once an integration is active, minimizing boilerplate at call sites. Explicit APIs (capture_exception, start_transaction, set_tag) are available for manual instrumentation when auto-instrumentation isn’t enough, giving the SDK both a zero-config default path and a fully explicit one.

Used by 25 apps in this directory

Python
99%
Apache 2.0

Rasa Open Source

AI Assistants · AI Development · Voice AI

21,353

Rasa Open Source is a Python machine learning framework for building contextual, multi-turn chatbots and voice assistants that understand natural language and maintain conversation state.

View details
62
Repo Health
78
Technical
63
Dependency
Built with
Python 99%
Updated 3 months ago
Python
45%
Other

Redash

Analytics · Data Engineering

28,849

Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.

View details
91
Repo Health
74
Technical
61
Dependency
Built with
Python 45%
JavaScript 29%
TypeScript 19%
Updated 1 weeks ago
Python
57%
Other

Sentry

Analytics · Developer Tools · Monitoring

45,632

Developer-first error tracking and performance monitoring platform with AI-powered root-cause analysis across 20+ languages and frameworks.

View details
95
Repo Health
80
Technical
66
Dependency
Built with
Python 57%
TypeScript 42%
Updated 6 days ago
Python
97%
MPL 2.0

Taiga Back

Developer Tools · Project Management

859

Self-hosted agile project management backend with Scrum, Kanban, issue tracking, and a full REST API — built on Django and PostgreSQL.

View details
72
Repo Health
74
Technical
64
Dependency
Built with
Python 97%
Updated 1 months ago
Python
68%
AGPL 3.0

Tracecat

AI Agents · Automation · Security

3,860

Open-source agentic security automation platform that runs AI agents and durable workflows at scale with sandboxed execution.

View details
89
Repo Health
88
Technical
66
Dependency
Built with
Python 68%
TypeScript 30%
Updated 6 days ago
Go
54%
AGPL 3.0

Uptrace

Devops · Monitoring

4,305

Unified open-source APM that collects OpenTelemetry traces, metrics, and logs into a single self-hosted platform backed by ClickHouse.

View details
71
Repo Health
70
Technical
65
Dependency
Built with
Go 54%
Vue 34%
Updated 1 weeks ago
Python
92%
GPL 3.0

Weblate

Developer Tools

6,124

Continuous localization platform that commits translations directly into your version control system with full translator attribution.

View details
95
Repo Health
86
Technical
67
Dependency
Built with
Python 92%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers