sentry-sdk

Python client for Sentry (https://sentry.io)

338 个版本 Python >=3.6
Sentry Team and Contributors <hello@sentry.io>
安装
pip install sentry-sdk
poetry add sentry-sdk
pipenv install sentry-sdk
conda install sentry-sdk
描述
Sentry for Python

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.

Discord X Follow PyPi page link -- version python Build Status


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,
)

With this configuration, Sentry will monitor for exceptions and performance issues.

Quick Usage Example

To generate some events that will show up in Sentry, you can log messages or capture errors:

import sentry_sdk
sentry_sdk.init(...)  # same as above

sentry_sdk.capture_message("Hello Sentry!")  # You'll see this in your Sentry dashboard.

raise ValueError("Oops, something went wrong!")  # This will create an error event in Sentry.

📚 Documentation

For more details on advanced usage, integrations, and customization, check out the full documentation on https://docs.sentry.io.

🧩 Integrations

Sentry integrates with a ton of popular Python libraries and frameworks, including FastAPI, Django, Celery, OpenAI and many, many more. Check out the full list of integrations to get the full picture.

🚧 Migrating Between Versions?

From 1.x to 2.x

If you're using the older 1.x version of the SDK, now's the time to upgrade to 2.x. It includes significant upgrades and new features. Check our migration guide for assistance.

From raven-python

Using the legacy raven-python client? It's now in maintenance mode, and we recommend migrating to the new SDK for an improved experience. Get all the details in our migration guide.

🙌 Want to Contribute?

We'd love your help in improving the Sentry SDK! Whether it's fixing bugs, adding features, writing new integrations, or enhancing documentation, every contribution is valuable.

For details on how to contribute, please read our contribution guide and explore the open issues.

🛟 Need Help?

If you encounter issues or need help setting up or configuring the SDK, don't hesitate to reach out to the Sentry Community on Discord. There is a ton of great people there ready to help!

🔗 Resources

Here are all resources to help you make the most of Sentry:

📃 License

The SDK is open-source and available under the MIT license. Check out the LICENSE file for more information.

😘 Contributors

Thanks to everyone who has helped improve the SDK!

版本列表
3.0.0a7 2025-10-20
3.0.0a6 2025-09-01
3.0.0a5 2025-08-07
3.0.0a4 2025-07-31
3.0.0a3 2025-07-22
3.0.0a2 2025-06-12
3.0.0a1 2025-05-08
2.63.0 2026-06-16
2.62.0 2026-06-08
2.61.1 2026-06-01
2.61.0 2026-05-28
2.60.0 2026-05-13
2.59.0 2026-05-04
2.59.0a2 2026-05-08
2.59.0a1 2026-05-05
2.58.0 2026-04-13
2.58.0a1 2026-04-21
2.57.0 2026-03-31
2.56.0 2026-03-24
2.55.0 2026-03-17
2.54.0 2026-03-02
2.53.0 2026-02-16
2.52.0 2026-02-04
2.52.0a9 2026-03-26
2.52.0a8 2026-03-03
2.52.0a7 2026-02-25
2.52.0a6 2026-02-23
2.52.0a5 2026-02-12
2.52.0a4 2026-02-10
2.52.0a3 2026-02-09
2.52.0a2 2026-02-02
2.52.0a1 2026-02-02
2.51.0 2026-01-28
2.51.0a1 2026-01-28
2.50.0 2026-01-20
2.49.0 2026-01-08
2.48.0 2025-12-16
2.47.0 2025-12-03
2.46.0 2025-11-24
2.45.0 2025-11-18
2.44.0 2025-11-11
2.43.0 2025-10-29
2.42.1 2025-10-20
2.42.0 2025-10-15
2.41.0 2025-10-09
2.40.0 2025-10-06
2.39.0 2025-09-25
2.38.0 2025-09-15
2.37.1 2025-09-09
2.37.0 2025-09-05
2.36.0 2025-09-04
2.35.2 2025-09-01
2.35.1 2025-08-26
2.35.0 2025-08-14
2.34.1 2025-07-30
2.34.0 2025-07-29
2.33.2 2025-07-22
2.33.1 2025-07-21
2.33.0 2025-07-15
2.32.0 2025-06-27
2.31.0 2025-06-24
2.30.0 2025-06-12
2.29.1 2025-05-19
2.29.0 2025-05-19
2.28.0 2025-05-12
2.27.0 2025-04-24
2.26.1 2025-04-15
2.26.0 2025-04-14
2.25.1 2025-04-02
2.25.0 2025-03-31
2.24.1 2025-03-24
2.24.0 2025-03-21
2.23.1 2025-03-17
2.23.0 2025-03-17
2.22.0 2025-02-17
2.21.0 2025-02-12
2.20.0 2025-01-14
2.19.2 2024-12-06
2.19.1 2024-12-05
2.19.0 2024-11-21
2.18.0 2024-11-04
2.17.0 2024-10-17
2.16.0 2024-10-08
2.15.0 2024-10-01
2.14.0 2024-09-09
2.13.0 2024-08-13
2.12.0 2024-07-31
2.11.0 2024-07-24
2.10.0 2024-07-15
2.9.0 2024-07-10
2.8.0 2024-07-08
2.7.1 2024-06-27
2.7.0 2024-06-26
2.6.0 2024-06-19
2.5.1 2024-06-07
2.5.0 2024-06-06
2.4.0 2024-06-04
2.3.1 2024-05-23
2.3.0 2024-05-23
2.2.1 2024-05-21
2.2.0 2024-05-16
2.1.1 2024-05-06
2.1.0 2024-05-06
2.0.1 2024-04-26
2.0.0 2024-04-25
2.0.0rc6 2024-04-23
2.0.0rc5 2024-04-10
2.0.0rc4 2024-04-03
2.0.0rc3 2024-03-21
2.0.0rc2 2024-03-13
2.0.0rc1 2024-03-11
2.0.0a2 2024-02-29
2.0.0a1 2024-02-26
1.45.1 2024-07-26
1.45.0 2024-04-10
1.44.1 2024-04-03
1.44.0 2024-03-28
1.43.0 2024-03-20
1.42.0 2024-03-13
1.41.0 2024-03-07
1.40.6 2024-02-27
1.40.5 2024-02-19
1.40.4 2024-02-13
1.40.3 2024-02-09
1.40.2 2024-02-07
1.40.1 2024-02-06
1.40.0 2024-01-30
1.39.2 2024-01-10
1.39.1 2023-12-14
1.39.0 2023-12-12
1.38.0 2023-11-29
1.37.1 2023-11-24
1.37.0 2023-11-24
1.36.0 2023-11-21
1.35.0 2023-11-13
1.34.0 2023-11-02
1.33.1 2023-10-31
1.33.0 2023-10-31
1.32.0 2023-10-11
1.31.0 2023-09-13
1.30.0 2023-08-29
1.29.2 2023-08-01
1.29.1 2023-08-01
1.29.0 2023-07-31
1.28.1 2023-07-13
1.28.0 2023-07-10
1.27.1 2023-07-06
1.27.0 2023-07-04
1.26.0 2023-06-22
1.25.1 2023-06-07
1.25.0 2023-06-02
1.24.0 2023-05-23
1.23.1 2023-05-17
1.23.0 2023-05-15
1.22.2 2023-05-08
1.22.1 2023-05-05
1.22.0 2023-05-05
1.21.1 2023-04-28
1.21.0 2023-04-25
1.20.0 2023-04-19
1.19.1 2023-04-05
1.19.0 2023-04-04
1.18.0 2023-03-28
1.17.0 2023-03-16
1.16.0 2023-02-27
1.15.0 2023-02-07
1.14.0 2023-01-23
1.13.0 2023-01-12
1.12.1 2022-12-19
1.12.0 2022-12-15
1.11.1 2022-11-22
1.11.0 2022-11-14
1.10.1 2022-10-21
1.10.0 2022-10-20
1.9.10 2022-10-03
1.9.9 2022-09-26
1.9.8 2022-09-05
1.9.7 2022-09-01
1.9.6 2022-08-31
1.9.5 2022-08-16
1.9.4 2022-08-11
1.9.3 2022-08-09
1.9.2 2022-08-05
1.9.1 2022-08-05
1.9.0 2022-07-28
1.8.0 2022-07-21
1.7.2 2022-07-15
1.7.1 2022-07-13
1.7.0 2022-07-11
1.6.0 2022-06-22
1.5.12 2022-05-10
1.5.11 2022-05-03
1.5.10 2022-04-15
1.5.9 2022-04-11
1.5.8 2022-03-18
1.5.7 2022-03-08
1.5.6 2022-02-22
1.5.5 2022-02-11
1.5.4 2022-01-25
1.5.3 2022-01-20
1.5.2 2022-01-10
1.5.1 2021-12-13
1.5.0 2021-11-17
1.4.3 2021-09-29
1.4.2 2021-09-27
1.4.1 2021-09-22
1.4.0 2021-09-21
1.3.1 2021-07-27
1.3.0 2021-07-08
1.2.0 2021-07-06
1.1.0 2021-05-06
1.0.0 2021-03-03
0.20.3 2021-02-18
0.20.2 2021-02-15
0.20.1 2021-02-12
0.20.0 2021-02-11
0.19.5 2020-12-10
0.19.4 2020-11-19
0.19.3 2020-11-12
0.19.2 2020-11-02
0.19.1 2020-10-19
0.19.0 2020-10-13
0.18.0 2020-09-29
0.17.8 2020-09-23
0.17.7 2020-09-22
0.17.6 2020-09-15
0.17.5 2020-09-14
0.17.4 2020-09-09
0.17.3 2020-09-02
0.17.2 2020-09-01
0.17.1 2020-08-28
0.17.0 2020-08-24
0.16.5 2020-08-14
0.16.4 2020-08-13
0.16.3 2020-08-01
0.16.2 2020-07-22
0.16.1 2020-07-10
0.16.0 2020-07-03
0.15.1 2020-06-18
0.15.0 2020-06-17
0.14.4 2020-05-13
0.14.3 2020-03-20
0.14.2 2020-02-26
0.14.1 2020-01-21
0.14.0 2020-01-08
0.13.5 2019-12-05
0.13.4 2019-11-26
0.13.3 2019-11-25
0.13.2 2019-11-08
0.13.1 2019-10-25
0.13.0 2019-10-17
0.12.3 2019-10-02
0.12.2 2019-09-21
0.12.1 2019-09-19
0.12.0 2019-09-18
0.11.2 2019-08-30
0.11.1 2019-08-19
0.11.0 2019-08-16
0.10.2 2019-07-15
0.10.1 2019-07-09
0.10.0 2019-07-06
0.9.5 2019-06-28
0.9.4 2019-06-28
0.9.3 2019-06-28
0.9.2 2019-06-23
0.9.1 2019-06-21
0.9.0 2019-06-03
0.8.1 2019-06-01
0.8.0 2019-05-17
0.7.14 2019-04-29
0.7.13 2019-04-29
0.7.12 2019-04-25
0.7.11 2019-04-23
0.7.10 2019-04-05
0.7.9 2019-03-30
0.7.8 2019-03-26
0.7.7 2019-03-20
0.7.6 2019-03-05
0.7.5 2019-03-05
0.7.4 2019-02-26
0.7.3 2019-02-17
0.7.2 2019-02-07
0.7.1 2019-02-06
0.7.0 2019-02-04
0.6.9 2019-01-19
0.6.8 2019-01-18
0.6.7 2019-01-17
0.6.6 2019-01-04
0.6.5 2018-12-21
0.6.4 2018-12-19
0.6.3 2018-12-19
0.6.2 2018-12-05
0.6.1 2018-12-04
0.6.0 2018-12-03
0.5.5 2018-11-15
0.5.4 2018-11-10
0.5.3 2018-11-05
0.5.2 2018-10-29
0.5.1 2018-10-24
0.5.0 2018-10-23
0.4.3 2018-10-19
0.4.2 2018-10-17
0.4.1 2018-10-11
0.4.0 2018-10-09
0.3.11 2018-10-08
0.3.10 2018-10-08
0.3.9 2018-10-03
0.3.8 2018-10-02
0.3.7 2018-10-01
0.3.6 2018-09-27
0.3.5 2018-09-25
0.3.4 2018-09-21
0.3.3 2018-09-21
0.3.2 2018-09-21
0.3.1 2018-09-17
0.3.0 2018-09-13
0.2.2 2018-09-11
0.2.1 2018-09-05
0.1.3 2018-08-27
0.1.2 2018-08-24
0.1.1 2018-08-21
0.1.0 2018-08-21
0.1.0rc9 2018-08-01
0.1.0rc8 2018-07-31
0.1.0rc7 2018-07-31
0.1.0rc6 2018-07-31
0.1.0rc5 2018-07-31
0.1.0rc4 2018-07-31
0.1.0rc3 2018-07-31
0.1.0rc2 2018-07-26
0.1.0rc16 2018-08-09
0.1.0rc15 2018-08-04
0.1.0rc14 2018-08-03
0.1.0rc13 2018-08-02
0.1.0rc12 2018-08-02
0.1.0rc11 2018-08-01
0.1.0rc10 2018-08-01
0.1.0rc1 2018-07-26