OSS TanbouSign in with GitHub

send Python errors, performance traces, and framework context to Sentry with the official SDK

OSS scale score 257.7OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
2,214
Primary language
Python
License
MIT
Repository last updated
Oct 5, 2026
On this page

Overview

sentry-python is the official Python SDK for Sentry. It captures exceptions, messages, and performance traces and integrates with Django, Flask, FastAPI, Celery, HTTPX, OpenTelemetry, and many AI and application libraries.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Capture exceptions, messages, and traces through one SDK

sentry_sdk.init() configures the DSN and sampling behavior, enabling automatic unhandled-exception capture and explicit events such as capture_message(). Performance traces can be configured through the same SDK.

Sources: [2]

Use integrations for web frameworks, task queues, HTTP clients, and more

Integrations cover FastAPI, Django, Flask, Celery, HTTPX, OpenTelemetry, OpenAI, and many other libraries so framework context and spans can flow into Sentry. Version 2.71.0 also adds a TypeSafe integration.

Sources: [2][4]

Best fit

Fits Python backends that want error monitoring and performance telemetry in Sentry

It is useful across web APIs, workers, serverless functions, and batch processes when exceptions and performance traces should be correlated with releases and environments in one monitoring platform.

Sources: [2]

Before adoption

Configure DSN, sampling, and data collection for production requirements

sentry-python 2.71.0 supports Python 3.6+ and requires a Sentry account and project. User data, HTTP bodies, trace sampling, and optional integration dependencies should be configured to match privacy, cost, and performance requirements.

Sources: [2][3]

Official sources

  1. [1]getsentry/sentry-python — GitHub repository(2026-10-06)
  2. [2]sentry-python 2.71.0 — README(2026-10-06)
  3. [3]sentry-python 2.71.0 — setup.py(2026-10-06)
  4. [4]sentry-python 2.71.0 release(2026-10-06)
  5. [5]sentry-python MIT license(2026-10-06)
Supplemental curator note

The SDK can add error monitoring to existing frameworks with little code, but production configuration should go beyond the DSN: define sampling, PII and HTTP-body collection, environment, and release tagging explicitly.

Try it in 3 steps

  1. 1

    Install sentry-python 2.71.0

    Pin the reviewed stable SDK release.

    python -m pip install "sentry-sdk==2.71.0"
  2. 2

    Set the DSN for a test project

    Replace the placeholder with the DSN from a Sentry project used for verification. Do not commit the real DSN.

    export SENTRY_DSN='https://YOUR_PUBLIC_KEY@YOUR_HOST/YOUR_PROJECT_ID'
  3. 3

    Send one message event

    Send one message to the test project and confirm the event in Sentry.

    python - <<'PY' import os import sentry_sdk sentry_sdk.init(dsn=os.environ['SENTRY_DSN']) sentry_sdk.capture_message('OSS Tanbou sentry-python check') sentry_sdk.flush(timeout=5) PY
Check the official README

Growth

Growth trends · Last 30 days

2,214 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • crash-reporting
  • hacktoberfest
  • python
  • sdk
  • sentry
  • sentry-python
  • tag-production
  • team-web-backend
Stars
2,214
Forks
684
Watchers
70
Open issues
359
Contributors
324
Owner type
Organization
Primary language
Python
License
MIT
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?