Python client for Sentry (https://sentry.io)
Actively maintained. Last release 5 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install sentry-sdk
Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions.
Official Sentry SDK for Python
Welcome to the official Python SDK for Sentry.
📦 Getting Started
Prerequisites
You need a Sentry account and project.
Installation
Getting Sentry into your project is straightforward. Just run this command in your terminal:
pip install --upgrade sentry-sdk
Basic Configuration
Here's a quick configuration example to get Sentry up and running:
import sentry_sdk
sentry_sdk.init(
"https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1", # Your DSN here
# Set traces_sample_rate to 1.0 to capture 100%
# of traces for performance monitoring.
traces_sample_rate=1.0,
# To disable sending user data and HTTP request/response bodies, uncomment
# the line below. For more info visit:
# https://docs.sentry.io/platforms/python/configuration/options/#data_collection
# data_collection={"user_info": False, "http_bodies": []},
)