sentry-sdk

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

SDK
PyPI
v2.68.0
2,202stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
97/100Excellent
Development Activity100
Maintenance100
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture87
Code Quality88
Innovation82
Learning Curve78

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
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

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.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
TypeScript
51%
MIT

Anarlog

Note Taking · AI Assistants · Productivity

9,087

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.

View details
86
Repo Health
77
Technical
69
Dependency
Built with
TypeScript51%
Rust38%
Updated today
Python
54%
Other

authentik

Authentication · Security

24,980

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.

View details
92
Repo Health
81
Technical
68
Dependency
Built with
Python54%
TypeScript33%
Updated today
Python
68%
Other

AutoGPT

Automation · Productivity · AI Assistants

186,687

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
67
Dependency
Built with
Python68%
TypeScript31%
Updated today
Python
68%
Other

Baserow

No Code Platforms · Databases

5,635

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python68%
JavaScript15%
Vue12%
Updated today
Python
83%
Other

Bugsink

Developer Tools · Monitoring

2,018

Self-hosted error tracking that accepts Sentry SDKs out of the box, so you keep your instrumentation and drop the monthly bill.

View details
84
Repo Health
80
Technical
76
Dependency
Built with
Python83%
HTML15%
Updated 1 weeks ago
Python
51%
MIT

Docs

File Storage · CMS

16,733

Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.

View details
87
Repo Health
81
Technical
72
Dependency
Built with
Python51%
TypeScript42%
Updated 2 days ago
Python
64%
BSD 3

Flagsmith

Developer Tools · Devops · Ab Testing Experimentation

6,518

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.

View details
91
Repo Health
82
Technical
65
Dependency
Built with
Python64%
TypeScript31%
Updated today

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

Search