sentry-sdk
The official Python SDK for Sentry error tracking, performance monitoring, and tracing.
Repository Health
Technical Analysis
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
cronsmodule for tracking scheduled task health - Configurable sample rates,
before_send/before_send_transactionhooks, 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
Agno
Devops · AI Development · Automation
Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.
Apache Airflow
Data Engineering
Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.
Anarlog
Note Taking · AI Assistants · Productivity
Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.
authentik
Authentication · Security
The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
Baserow
No Code Platforms · Databases
Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.
Bugsink
Developer Tools · Monitoring
Self-hosted error tracking that accepts Sentry SDKs out of the box, so you keep your instrumentation and drop the monthly bill.
Docs
File Storage · CMS
Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.
Flagsmith
Developer Tools · Devops · Ab Testing Experimentation
Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.