Skip to content

Commit 6ad3b1a

Browse files
committed
Merge branch 'master' into dependabot/github_actions/codecov/codecov-action-5.4.0
2 parents 180c189 + 5771f3e commit 6ad3b1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3572
-1674
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`.
66

7-
Running the test suite on your PR might require maintainer approval. The AWS Lambda tests additionally require a maintainer to add a special label, and they will fail until this label is added.
7+
Running the test suite on your PR might require maintainer approval.

.github/workflows/scripts/trigger_tests_on_label.py

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/test-integrations-cloud.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
# ubuntu-20.04 is the last version that supported python3.6
3636
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3737
os: [ubuntu-20.04]
38+
services:
39+
docker:
40+
image: docker:dind # Required for Docker network management
41+
options: --privileged # Required for Docker-in-Docker operations
3842
steps:
3943
- uses: actions/[email protected]
4044
- uses: actions/setup-python@v5
@@ -47,6 +51,10 @@ jobs:
4751
- name: Erase coverage
4852
run: |
4953
coverage erase
54+
- name: Test aws_lambda latest
55+
run: |
56+
set -x # print commands that are executed
57+
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda-latest"
5058
- name: Test boto3 latest
5159
run: |
5260
set -x # print commands that are executed
@@ -97,12 +105,16 @@ jobs:
97105
strategy:
98106
fail-fast: false
99107
matrix:
100-
python-version: ["3.6","3.7","3.9","3.11","3.12","3.13"]
108+
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"]
101109
# python3.6 reached EOL and is no longer being supported on
102110
# new versions of hosted runners on Github Actions
103111
# ubuntu-20.04 is the last version that supported python3.6
104112
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
105113
os: [ubuntu-20.04]
114+
services:
115+
docker:
116+
image: docker:dind # Required for Docker network management
117+
options: --privileged # Required for Docker-in-Docker operations
106118
steps:
107119
- uses: actions/[email protected]
108120
- uses: actions/setup-python@v5
@@ -115,6 +127,10 @@ jobs:
115127
- name: Erase coverage
116128
run: |
117129
coverage erase
130+
- name: Test aws_lambda pinned
131+
run: |
132+
set -x # print commands that are executed
133+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
118134
- name: Test boto3 pinned
119135
run: |
120136
set -x # print commands that are executed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ relay
2828
pip-wheel-metadata
2929
.mypy_cache
3030
.vscode/
31+
32+
# for running AWS Lambda tests using AWS SAM
33+
sam.template.yaml

README.md

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
22
<img src="https://sentry-brand.storage.googleapis.com/github-banners/github-sdk-python.png" alt="Sentry for Python">
33
</a>
4+
<div align="center">
45

6+
_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
7+
[<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_.
8+
9+
[![Discord](https://img.shields.io/discord/621778831602221064?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb)](https://discord.gg/wdNEHETs87)
10+
[![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=@getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
11+
[![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)
12+
<img src="https://img.shields.io/badge/python-3.7 | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 | 3.13-blue.svg" alt="python">
13+
[![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
14+
15+
<br/>
16+
17+
</div>
518

6-
_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, [<kbd>**check out our open positions**</kbd>](https://sentry.io/careers/)_.
719

820
# Official Sentry SDK for Python
921

10-
[![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
11-
[![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)
12-
[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/cWnMQeA)
22+
Welcome to the official Python SDK for **[Sentry](http://sentry.io/)**.
23+
24+
25+
## 📦 Getting Started
1326

14-
Welcome to the official Python SDK for **[Sentry](http://sentry.io/)**!
27+
### Prerequisites
1528

16-
## Getting Started
29+
You need a Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects/).
1730

1831
### Installation
1932

@@ -25,7 +38,7 @@ pip install --upgrade sentry-sdk
2538

2639
### Basic Configuration
2740

28-
Heres a quick configuration example to get Sentry up and running:
41+
Here's a quick configuration example to get Sentry up and running:
2942

3043
```python
3144
import sentry_sdk
@@ -34,7 +47,7 @@ sentry_sdk.init(
3447
"https://[email protected]/1", # Your DSN here
3548

3649
# Set traces_sample_rate to 1.0 to capture 100%
37-
# of transactions for performance monitoring.
50+
# of traces for performance monitoring.
3851
traces_sample_rate=1.0,
3952
)
4053
```
@@ -46,36 +59,26 @@ With this configuration, Sentry will monitor for exceptions and performance issu
4659
To generate some events that will show up in Sentry, you can log messages or capture errors:
4760

4861
```python
49-
from sentry_sdk import capture_message
50-
capture_message("Hello Sentry!") # You'll see this in your Sentry dashboard.
62+
import sentry_sdk
63+
sentry_sdk.init(...) # same as above
64+
65+
sentry_sdk.capture_message("Hello Sentry!") # You'll see this in your Sentry dashboard.
5166

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

55-
#### Explore the Docs
56-
57-
For more details on advanced usage, integrations, and customization, check out the full documentation:
58-
59-
- [Official SDK Docs](https://docs.sentry.io/platforms/python/)
60-
- [API Reference](https://getsentry.github.io/sentry-python/)
6170

62-
## Integrations
71+
## 📚 Documentation
6372

64-
Sentry integrates with many popular Python libraries and frameworks, including:
73+
For more details on advanced usage, integrations, and customization, check out the full documentation on [https://docs.sentry.io](https://docs.sentry.io/).
6574

66-
- [Django](https://docs.sentry.io/platforms/python/integrations/django/)
67-
- [Flask](https://docs.sentry.io/platforms/python/integrations/flask/)
68-
- [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/)
69-
- [Celery](https://docs.sentry.io/platforms/python/integrations/celery/)
70-
- [AWS Lambda](https://docs.sentry.io/platforms/python/integrations/aws-lambda/)
7175

72-
Want more? [Check out the full list of integrations](https://docs.sentry.io/platforms/python/integrations/).
76+
## 🧩 Integrations
7377

74-
### Rolling Your Own Integration?
78+
Sentry integrates with a ton of popular Python libraries and frameworks, including [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/), [Django](https://docs.sentry.io/platforms/python/integrations/django/), [Celery](https://docs.sentry.io/platforms/python/integrations/celery/), [OpenAI](https://docs.sentry.io/platforms/python/integrations/openai/) and many, many more. Check out the [full list of integrations](https://docs.sentry.io/platforms/python/integrations/) to get the full picture.
7579

76-
If you want to create a new integration or improve an existing one, we’d welcome your contributions! Please read our [contributing guide](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md) before starting.
7780

78-
## Migrating Between Versions?
81+
## 🚧 Migrating Between Versions?
7982

8083
### From `1.x` to `2.x`
8184

@@ -85,30 +88,35 @@ If you're using the older `1.x` version of the SDK, now's the time to upgrade to
8588

8689
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](https://docs.sentry.io/platforms/python/migration/raven-to-sentry-sdk/).
8790

88-
## Want to Contribute?
8991

90-
We’d love your help in improving the Sentry SDK! Whether it’s fixing bugs, adding features, or enhancing documentation, every contribution is valuable.
92+
## 🙌 Want to Contribute?
9193

92-
For details on how to contribute, please check out [CONTRIBUTING.md](CONTRIBUTING.md) and explore the [open issues](https://github.com/getsentry/sentry-python/issues).
94+
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.
9395

94-
## Need Help?
96+
For details on how to contribute, please read our [contribution guide](CONTRIBUTING.md) and explore the [open issues](https://github.com/getsentry/sentry-python/issues).
9597

96-
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](https://discord.com/invite/Ww9hbqr). There is a ton of great people there ready to help!
9798

98-
## Resources
99+
## 🛟 Need Help?
99100

100-
Here are additional resources to help you make the most of Sentry:
101+
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](https://discord.com/invite/Ww9hbqr). There is a ton of great people there ready to help!
101102

102-
- [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/quickstart/) – Official documentation to get started.
103-
- [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr) – Join our Discord community.
104-
- [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry) – Follow us on X (Twitter) for updates.
105-
- [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry) – Questions and answers related to Sentry.
106103

107-
## License
104+
## 🔗 Resources
105+
106+
Here are all resources to help you make the most of Sentry:
107+
108+
- [Documentation](https://docs.sentry.io/platforms/python/) - Official documentation to get started.
109+
- [Discord](https://img.shields.io/discord/621778831602221064) - Join our Discord community.
110+
- [X/Twitter](https://twitter.com/intent/follow?screen_name=getsentry) - Follow us on X (Twitter) for updates.
111+
- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) - Questions and answers related to Sentry.
112+
113+
<a name="license"></a>
114+
## 📃 License
108115

109116
The SDK is open-source and available under the MIT license. Check out the [LICENSE](LICENSE) file for more information.
110117

111-
---
118+
119+
## 😘 Contributors
112120

113121
Thanks to everyone who has helped improve the SDK!
114122

docs/api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Top Level API
55
This is the user facing API of the SDK. It's exposed as ``sentry_sdk``.
66
With this API you can implement a custom performance monitoring or error reporting solution.
77

8+
Initializing the SDK
9+
====================
10+
11+
.. autoclass:: sentry_sdk.client.ClientConstructor
12+
:members:
13+
:undoc-members:
14+
:special-members: __init__
15+
:noindex:
816

917
Capturing Data
1018
==============

requirements-testing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ socksio
1414
httpcore[http2]
1515
setuptools
1616
Brotli
17+
docker

scripts/aws-cleanup.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.
File renamed without changes.

scripts/aws-delete-lambda-layer-versions.sh renamed to scripts/aws/aws-delete-lambda-layer-versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
#
33
# Deletes all versions of the layer specified in LAYER_NAME in one region.
4+
# Use with caution!
45
#
56

67
set -euo pipefail

0 commit comments

Comments
 (0)