getsentry/sentry-python (sentry-sdk)
### [`v1.45.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1450)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.44.1...1.45.0)
This is the final 1.x release for the forseeable future. Development will continue on the 2.x release line. The first 2.x version will be available in the next few weeks.
##### Various fixes & improvements
- Allow to upsert monitors ([#2929](https://togithub.com/getsentry/sentry-python/issues/2929)) by [@sentrivana](https://togithub.com/sentrivana)
It's now possible to provide `monitor_config` to the `monitor` decorator/context manager directly:
```python
from sentry_sdk.crons import monitor
```
### [`v1.44.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1441)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.44.0...1.44.1)
##### Various fixes & improvements
- Make `monitor` async friendly ([#2912](https://togithub.com/getsentry/sentry-python/issues/2912)) by [@sentrivana](https://togithub.com/sentrivana)
You can now decorate your async functions with the `monitor`
decorator and they will correctly report their duration
and completion status.
- Fixed `Event | None` runtime `TypeError` ([#2928](https://togithub.com/getsentry/sentry-python/issues/2928)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
### [`v1.44.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1440)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.43.0...1.44.0)
##### Various fixes & improvements
- ref: Define types at runtime ([#2914](https://togithub.com/getsentry/sentry-python/issues/2914)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Explicit reexport of types ([#2866](https://togithub.com/getsentry/sentry-python/issues/2866)) ([#2913](https://togithub.com/getsentry/sentry-python/issues/2913)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- feat(profiling): Add thread data to spans ([#2843](https://togithub.com/getsentry/sentry-python/issues/2843)) by [@Zylphrex](https://togithub.com/Zylphrex)
### [`v1.43.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1430)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.42.0...1.43.0)
##### Various fixes & improvements
- Add optional `keep_alive` ([#2842](https://togithub.com/getsentry/sentry-python/issues/2842)) by [@sentrivana](https://togithub.com/sentrivana)
If you're experiencing frequent network issues between the SDK and Sentry,
you can try turning on TCP keep-alive:
```python
import sentry_sdk
sentry_sdk.init(
```
### ...your usual settings...
keep_alive=True,
)
```
- Add support for Celery Redbeat cron tasks (#2643) by @kwigley
The SDK now supports the Redbeat scheduler in addition to the default
Celery Beat scheduler for auto instrumenting crons. See
[the docs](https://docs.sentry.io/platforms/python/integrations/celery/crons/)
for more information about how to set this up.
- `aws_event` can be an empty list (#2849) by @sentrivana
- Re-export `Event` in `types.py` (#2829) by @szokeasaurusrex
- Small API docs improvement (#2828) by @antonpirker
- Fixed OpenAI tests (#2834) by @antonpirker
- Bump `checkouts/data-schemas` from `ed078ed` to `8232f17` (#2832) by @dependabot
```
### [`v1.42.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1420)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.41.0...1.42.0)
##### Various fixes & improvements
- **New integration:** [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/) ([#2791](https://togithub.com/getsentry/sentry-python/issues/2791)) by [@colin-sentry](https://togithub.com/colin-sentry)
We added an integration for OpenAI to capture errors and also performance data when using the OpenAI Python SDK.
Useage:
This integrations is auto-enabling, so if you have the `openai` package in your project it will be enabled. Just initialize Sentry before you create your OpenAI client.
```python
from openai import OpenAI
import sentry_sdk
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
enable_tracing=True,
traces_sample_rate=1.0,
)
client = OpenAI()
```
For more information, see the documentation for [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/).
- Discard open OpenTelemetry spans after 10 minutes ([#2801](https://togithub.com/getsentry/sentry-python/issues/2801)) by [@antonpirker](https://togithub.com/antonpirker)
- Propagate sentry-trace and baggage headers to Huey tasks ([#2792](https://togithub.com/getsentry/sentry-python/issues/2792)) by [@cnschn](https://togithub.com/cnschn)
- Added Event type ([#2753](https://togithub.com/getsentry/sentry-python/issues/2753)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Improve scrub_dict typing ([#2768](https://togithub.com/getsentry/sentry-python/issues/2768)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Dependencies: bump types-protobuf from 4.24.0.20240302 to 4.24.0.20240311 ([#2797](https://togithub.com/getsentry/sentry-python/issues/2797)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.41.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1410)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.6...1.41.0)
##### Various fixes & improvements
- Add recursive scrubbing to `EventScrubber` ([#2755](https://togithub.com/getsentry/sentry-python/issues/2755)) by [@Cheapshot003](https://togithub.com/Cheapshot003)
By default, the `EventScrubber` will not search your events for potential
PII recursively. With this release, you can enable this behavior with:
```python
import sentry_sdk
from sentry_sdk.scrubber import EventScrubber
sentry_sdk.init(
```
### ...your usual settings...
event_scrubber=EventScrubber(recursive=True),
)
````
- Expose `socket_options` (#2786) by @sentrivana
If the SDK is experiencing connection issues (connection resets, server
closing connection without response, etc.) while sending events to Sentry,
tweaking the default `urllib3` socket options to the following can help:
```python
import socket
from urllib3.connection import HTTPConnection
import sentry_sdk
sentry_sdk.init(
### ...your usual settings...
socket_options=HTTPConnection.default_socket_options + [
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
### note: skip the following line if you're on MacOS since TCP_KEEPIDLE doesn't exist there
(socket.SOL_TCP, socket.TCP_KEEPIDLE, 45),
(socket.SOL_TCP, socket.TCP_KEEPINTVL, 10),
(socket.SOL_TCP, socket.TCP_KEEPCNT, 6),
],
)
````
- Allow to configure merge target for releases ([#2777](https://togithub.com/getsentry/sentry-python/issues/2777)) by [@sentrivana](https://togithub.com/sentrivana)
- Allow empty character in metric tags values ([#2775](https://togithub.com/getsentry/sentry-python/issues/2775)) by [@viglia](https://togithub.com/viglia)
- Replace invalid tag values with an empty string instead of \_ ([#2773](https://togithub.com/getsentry/sentry-python/issues/2773)) by [@markushi](https://togithub.com/markushi)
- Add documentation comment to `scrub_list` ([#2769](https://togithub.com/getsentry/sentry-python/issues/2769)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Fixed regex to parse version in lambda package file ([#2767](https://togithub.com/getsentry/sentry-python/issues/2767)) by [@antonpirker](https://togithub.com/antonpirker)
- xfail broken AWS Lambda tests for now ([#2794](https://togithub.com/getsentry/sentry-python/issues/2794)) by [@sentrivana](https://togithub.com/sentrivana)
- Removed print statements because it messes with the tests ([#2789](https://togithub.com/getsentry/sentry-python/issues/2789)) by [@antonpirker](https://togithub.com/antonpirker)
- Bump `types-protobuf` from 4.24.0.20240129 to 4.24.0.20240302 ([#2782](https://togithub.com/getsentry/sentry-python/issues/2782)) by [@dependabot](https://togithub.com/dependabot)
- Bump `checkouts/data-schemas` from `eb941c2` to `ed078ed` ([#2781](https://togithub.com/getsentry/sentry-python/issues/2781)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.40.6`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1406)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.5...1.40.6)
##### Various fixes & improvements
- Fix compatibility with `greenlet`/`gevent` ([#2756](https://togithub.com/getsentry/sentry-python/issues/2756)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix query source relative filepath ([#2717](https://togithub.com/getsentry/sentry-python/issues/2717)) by [@gggritso](https://togithub.com/gggritso)
- Support `clickhouse-driver==0.2.7` ([#2752](https://togithub.com/getsentry/sentry-python/issues/2752)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump `checkouts/data-schemas` from `6121fd3` to `eb941c2` ([#2747](https://togithub.com/getsentry/sentry-python/issues/2747)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.40.5`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1405)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.4...1.40.5)
##### Various fixes & improvements
- Deprecate `last_event_id()`. ([#2749](https://togithub.com/getsentry/sentry-python/issues/2749)) by [@antonpirker](https://togithub.com/antonpirker)
- Warn if uWSGI is set up without proper thread support ([#2738](https://togithub.com/getsentry/sentry-python/issues/2738)) by [@sentrivana](https://togithub.com/sentrivana)
uWSGI has to be run in threaded mode for the SDK to run properly. If this is
not the case, the consequences could range from features not working unexpectedly
to uWSGI workers crashing.
Please make sure to run uWSGI with both `--enable-threads` and `--py-call-uwsgi-fork-hooks`.
- `parsed_url` can be `None` ([#2734](https://togithub.com/getsentry/sentry-python/issues/2734)) by [@sentrivana](https://togithub.com/sentrivana)
- Python 3.7 is not supported anymore by Lambda, so removed it and added 3.12 ([#2729](https://togithub.com/getsentry/sentry-python/issues/2729)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.40.4`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1404)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.3...1.40.4)
##### Various fixes & improvements
- Only start metrics flusher thread on demand ([#2727](https://togithub.com/getsentry/sentry-python/issues/2727)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump checkouts/data-schemas from `aa7058c` to `6121fd3` ([#2724](https://togithub.com/getsentry/sentry-python/issues/2724)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.40.3`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1403)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.2...1.40.3)
##### Various fixes & improvements
- Turn off metrics for uWSGI ([#2720](https://togithub.com/getsentry/sentry-python/issues/2720)) by [@sentrivana](https://togithub.com/sentrivana)
- Minor improvements ([#2714](https://togithub.com/getsentry/sentry-python/issues/2714)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.40.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1402)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.1...1.40.2)
##### Various fixes & improvements
- test: Fix `pytest` error ([#2712](https://togithub.com/getsentry/sentry-python/issues/2712)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- build(deps): bump types-protobuf from 4.24.0.4 to 4.24.0.20240129 ([#2691](https://togithub.com/getsentry/sentry-python/issues/2691)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.40.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1401)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.0...1.40.1)
##### Various fixes & improvements
- Fix uWSGI workers hanging ([#2694](https://togithub.com/getsentry/sentry-python/issues/2694)) by [@sentrivana](https://togithub.com/sentrivana)
- Make metrics work with `gevent` ([#2694](https://togithub.com/getsentry/sentry-python/issues/2694)) by [@sentrivana](https://togithub.com/sentrivana)
- Guard against `engine.url` being `None` ([#2708](https://togithub.com/getsentry/sentry-python/issues/2708)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix performance regression in `sentry_sdk.utils._generate_installed_modules` ([#2703](https://togithub.com/getsentry/sentry-python/issues/2703)) by [@GlenWalker](https://togithub.com/GlenWalker)
- Guard against Sentry initialization mid SQLAlchemy cursor ([#2702](https://togithub.com/getsentry/sentry-python/issues/2702)) by [@apmorton](https://togithub.com/apmorton)
- Fix yaml generation script ([#2695](https://togithub.com/getsentry/sentry-python/issues/2695)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix AWS Lambda workflow ([#2710](https://togithub.com/getsentry/sentry-python/issues/2710)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump `codecov/codecov-action` from 3 to 4 ([#2706](https://togithub.com/getsentry/sentry-python/issues/2706)) by [@dependabot](https://togithub.com/dependabot)
- Bump `actions/cache` from 3 to 4 ([#2661](https://togithub.com/getsentry/sentry-python/issues/2661)) by [@dependabot](https://togithub.com/dependabot)
- Bump `actions/checkout` from 3.1.0 to 4.1.1 ([#2561](https://togithub.com/getsentry/sentry-python/issues/2561)) by [@dependabot](https://togithub.com/dependabot)
- Bump `github/codeql-action` from 2 to 3 ([#2603](https://togithub.com/getsentry/sentry-python/issues/2603)) by [@dependabot](https://togithub.com/dependabot)
- Bump `actions/setup-python` from 4 to 5 ([#2577](https://togithub.com/getsentry/sentry-python/issues/2577)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.40.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1400)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.2...1.40.0)
##### Various fixes & improvements
- Enable metrics related settings by default ([#2685](https://togithub.com/getsentry/sentry-python/issues/2685)) by [@iambriccardo](https://togithub.com/iambriccardo)
- Fix `UnicodeDecodeError` on Python 2 ([#2657](https://togithub.com/getsentry/sentry-python/issues/2657)) by [@sentrivana](https://togithub.com/sentrivana)
- Enable DB query source by default ([#2629](https://togithub.com/getsentry/sentry-python/issues/2629)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix query source duration check ([#2675](https://togithub.com/getsentry/sentry-python/issues/2675)) by [@sentrivana](https://togithub.com/sentrivana)
- Reformat with `black==24.1.0` ([#2680](https://togithub.com/getsentry/sentry-python/issues/2680)) by [@sentrivana](https://togithub.com/sentrivana)
- Cleaning up existing code to prepare for new Scopes API ([#2611](https://togithub.com/getsentry/sentry-python/issues/2611)) by [@antonpirker](https://togithub.com/antonpirker)
- Moved redis related tests to databases ([#2674](https://togithub.com/getsentry/sentry-python/issues/2674)) by [@antonpirker](https://togithub.com/antonpirker)
- Improve `sentry_sdk.trace` type hints ([#2633](https://togithub.com/getsentry/sentry-python/issues/2633)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Bump `checkouts/data-schemas` from `e9f7d58` to `aa7058c` ([#2639](https://togithub.com/getsentry/sentry-python/issues/2639)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.39.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1392)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.1...1.39.2)
##### Various fixes & improvements
- Fix timestamp in transaction created by OTel ([#2627](https://togithub.com/getsentry/sentry-python/issues/2627)) by [@antonpirker](https://togithub.com/antonpirker)
- Fix relative path in DB query source ([#2624](https://togithub.com/getsentry/sentry-python/issues/2624)) by [@antonpirker](https://togithub.com/antonpirker)
- Run more CI checks on 2.0 branch ([#2625](https://togithub.com/getsentry/sentry-python/issues/2625)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix tracing `TypeError` for static and class methods ([#2559](https://togithub.com/getsentry/sentry-python/issues/2559)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Fix missing `ctx` in Arq integration ([#2600](https://togithub.com/getsentry/sentry-python/issues/2600)) by [@ivanovart](https://togithub.com/ivanovart)
- Change `data_category` from `check_in` to `monitor` ([#2598](https://togithub.com/getsentry/sentry-python/issues/2598)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.39.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1391)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.0...1.39.1)
##### Various fixes & improvements
- Fix psycopg2 detection in the Django integration ([#2593](https://togithub.com/getsentry/sentry-python/issues/2593)) by [@sentrivana](https://togithub.com/sentrivana)
- Filter out empty string releases ([#2591](https://togithub.com/getsentry/sentry-python/issues/2591)) by [@sentrivana](https://togithub.com/sentrivana)
- Fixed local var not present when there is an error in a user's `error_sampler` function ([#2511](https://togithub.com/getsentry/sentry-python/issues/2511)) by [@antonpirker](https://togithub.com/antonpirker)
- Fixed typing in `aiohttp` ([#2590](https://togithub.com/getsentry/sentry-python/issues/2590)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.39.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1390)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.38.0...1.39.0)
##### Various fixes & improvements
- Add support for cluster clients from Redis SDK ([#2394](https://togithub.com/getsentry/sentry-python/issues/2394)) by [@md384](https://togithub.com/md384)
- Improve location reporting for timer metrics ([#2552](https://togithub.com/getsentry/sentry-python/issues/2552)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Fix Celery `TypeError` with no-argument `apply_async` ([#2575](https://togithub.com/getsentry/sentry-python/issues/2575)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Fix Lambda integration with EventBridge source ([#2546](https://togithub.com/getsentry/sentry-python/issues/2546)) by [@davidcroda](https://togithub.com/davidcroda)
- Add max tries to Spotlight ([#2571](https://togithub.com/getsentry/sentry-python/issues/2571)) by [@hazAT](https://togithub.com/hazAT)
- Handle `os.path.devnull` access issues ([#2579](https://togithub.com/getsentry/sentry-python/issues/2579)) by [@sentrivana](https://togithub.com/sentrivana)
- Change `code.filepath` frame picking logic ([#2568](https://togithub.com/getsentry/sentry-python/issues/2568)) by [@sentrivana](https://togithub.com/sentrivana)
- Trigger AWS Lambda tests on label ([#2538](https://togithub.com/getsentry/sentry-python/issues/2538)) by [@sentrivana](https://togithub.com/sentrivana)
- Run permissions step on pull_request_target but not push ([#2548](https://togithub.com/getsentry/sentry-python/issues/2548)) by [@sentrivana](https://togithub.com/sentrivana)
- Hash AWS Lambda test functions based on current revision ([#2557](https://togithub.com/getsentry/sentry-python/issues/2557)) by [@sentrivana](https://togithub.com/sentrivana)
- Update Django version in tests ([#2562](https://togithub.com/getsentry/sentry-python/issues/2562)) by [@sentrivana](https://togithub.com/sentrivana)
- Make metrics tests non-flaky ([#2572](https://togithub.com/getsentry/sentry-python/issues/2572)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.38.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1380)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.37.1...1.38.0)
##### Various fixes & improvements
- Only add trace context to checkins and do not run `event_processors` for checkins ([#2536](https://togithub.com/getsentry/sentry-python/issues/2536)) by [@antonpirker](https://togithub.com/antonpirker)
- Metric span summaries ([#2522](https://togithub.com/getsentry/sentry-python/issues/2522)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Add source context to code locations ([#2539](https://togithub.com/getsentry/sentry-python/issues/2539)) by [@jan-auer](https://togithub.com/jan-auer)
- Use in-app filepath instead of absolute path ([#2541](https://togithub.com/getsentry/sentry-python/issues/2541)) by [@antonpirker](https://togithub.com/antonpirker)
- Switch to `jinja2` for generating CI yamls ([#2534](https://togithub.com/getsentry/sentry-python/issues/2534)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.37.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1371)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.37.0...1.37.1)
##### Various fixes & improvements
- Fix `NameError` on `parse_version` with eventlet ([#2532](https://togithub.com/getsentry/sentry-python/issues/2532)) by [@sentrivana](https://togithub.com/sentrivana)
- build(deps): bump checkouts/data-schemas from `68def1e` to `e9f7d58` ([#2501](https://togithub.com/getsentry/sentry-python/issues/2501)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.37.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1370)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.36.0...1.37.0)
##### Various fixes & improvements
- Move installed modules code to utils ([#2429](https://togithub.com/getsentry/sentry-python/issues/2429)) by [@sentrivana](https://togithub.com/sentrivana)
Note: We moved the internal function `_get_installed_modules` from `sentry_sdk.integrations.modules` to `sentry_sdk.utils`.
So if you use this function you have to update your imports
- Add code locations for metrics ([#2526](https://togithub.com/getsentry/sentry-python/issues/2526)) by [@jan-auer](https://togithub.com/jan-auer)
- Add query source to DB spans ([#2521](https://togithub.com/getsentry/sentry-python/issues/2521)) by [@antonpirker](https://togithub.com/antonpirker)
- Send events to Spotlight sidecar ([#2524](https://togithub.com/getsentry/sentry-python/issues/2524)) by [@HazAT](https://togithub.com/HazAT)
- Run integration tests with newest `pytest` ([#2518](https://togithub.com/getsentry/sentry-python/issues/2518)) by [@sentrivana](https://togithub.com/sentrivana)
- Bring tests up to date ([#2512](https://togithub.com/getsentry/sentry-python/issues/2512)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix: Prevent global var from being discarded at shutdown ([#2530](https://togithub.com/getsentry/sentry-python/issues/2530)) by [@antonpirker](https://togithub.com/antonpirker)
- Fix: Scope transaction source not being updated in scope.span setter ([#2519](https://togithub.com/getsentry/sentry-python/issues/2519)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py)
### [`v1.36.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1360)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.35.0...1.36.0)
##### Various fixes & improvements
- Django: Support Django 5.0 ([#2490](https://togithub.com/getsentry/sentry-python/issues/2490)) by [@sentrivana](https://togithub.com/sentrivana)
- Django: Handling ASGI body in the right way. ([#2513](https://togithub.com/getsentry/sentry-python/issues/2513)) by [@antonpirker](https://togithub.com/antonpirker)
- Flask: Test with Flask 3.0 ([#2506](https://togithub.com/getsentry/sentry-python/issues/2506)) by [@sentrivana](https://togithub.com/sentrivana)
- Celery: Do not create a span when task is triggered by Celery Beat ([#2510](https://togithub.com/getsentry/sentry-python/issues/2510)) by [@antonpirker](https://togithub.com/antonpirker)
- Redis: Ensure `RedisIntegration` is disabled, unless `redis` is installed ([#2504](https://togithub.com/getsentry/sentry-python/issues/2504)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Quart: Fix Quart integration for Quart 0.19.4 ([#2516](https://togithub.com/getsentry/sentry-python/issues/2516)) by [@antonpirker](https://togithub.com/antonpirker)
- gRPC: Make async gRPC less noisy ([#2507](https://togithub.com/getsentry/sentry-python/issues/2507)) by [@jyggen](https://togithub.com/jyggen)
### [`v1.35.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1350)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.34.0...1.35.0)
##### Various fixes & improvements
- **Updated gRPC integration:** Asyncio interceptors and easier setup ([#2369](https://togithub.com/getsentry/sentry-python/issues/2369)) by [@fdellekart](https://togithub.com/fdellekart)
Our gRPC integration now instruments incoming unary-unary grpc requests and outgoing unary-unary, unary-stream grpc requests using grpcio channels. Everything works now for sync and async code.
Before this release you had to add Sentry interceptors by hand to your gRPC code, now the only thing you need to do is adding the `GRPCIntegration` to you `sentry_sdk_init()` call. (See [documentation](https://docs.sentry.io/platforms/python/integrations/grpc/) for more information):
```python
import sentry_sdk
from sentry_sdk.integrations.grpc import GRPCIntegration
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
enable_tracing=True,
integrations=[
GRPCIntegration(),
],
)
```
The old way still works, but we strongly encourage you to update your code to the way described above.
- Python 3.12: Replace deprecated datetime functions ([#2502](https://togithub.com/getsentry/sentry-python/issues/2502)) by [@sentrivana](https://togithub.com/sentrivana)
- Metrics: Unify datetime format ([#2409](https://togithub.com/getsentry/sentry-python/issues/2409)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Celery: Set correct data in `check_in`s ([#2500](https://togithub.com/getsentry/sentry-python/issues/2500)) by [@antonpirker](https://togithub.com/antonpirker)
- Celery: Read timezone for Crons monitors from `celery_schedule` if existing ([#2497](https://togithub.com/getsentry/sentry-python/issues/2497)) by [@antonpirker](https://togithub.com/antonpirker)
- Django: Removing redundant code in Django tests ([#2491](https://togithub.com/getsentry/sentry-python/issues/2491)) by [@vagi8](https://togithub.com/vagi8)
- Django: Make reading the request body work in Django ASGI apps. ([#2495](https://togithub.com/getsentry/sentry-python/issues/2495)) by [@antonpirker](https://togithub.com/antonpirker)
- FastAPI: Use wraps on fastapi request call wrapper ([#2476](https://togithub.com/getsentry/sentry-python/issues/2476)) by [@nkaras](https://togithub.com/nkaras)
- Fix: Probe for psycopg2 and psycopg3 parameters function. ([#2492](https://togithub.com/getsentry/sentry-python/issues/2492)) by [@antonpirker](https://togithub.com/antonpirker)
- Fix: Remove unnecessary TYPE_CHECKING alias ([#2467](https://togithub.com/getsentry/sentry-python/issues/2467)) by [@rafrafek](https://togithub.com/rafrafek)
### [`v1.34.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1340)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.33.1...1.34.0)
##### Various fixes & improvements
- Added Python 3.12 support ([#2471](https://togithub.com/getsentry/sentry-python/issues/2471), [#2483](https://togithub.com/getsentry/sentry-python/issues/2483))
- Handle missing `connection_kwargs` in `patch_redis_client` ([#2482](https://togithub.com/getsentry/sentry-python/issues/2482)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Run common test suite on Python 3.12 ([#2479](https://togithub.com/getsentry/sentry-python/issues/2479)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.33.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1331)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.33.0...1.33.1)
##### Various fixes & improvements
- Make parse_version work in utils.py itself. ([#2474](https://togithub.com/getsentry/sentry-python/issues/2474)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.33.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1330)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.32.0...1.33.0)
##### Various fixes & improvements
- New: Added `error_sampler` option ([#2456](https://togithub.com/getsentry/sentry-python/issues/2456)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Python 3.12: Detect interpreter in shutdown state on thread spawn ([#2468](https://togithub.com/getsentry/sentry-python/issues/2468)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Patch eventlet under Sentry SDK ([#2464](https://togithub.com/getsentry/sentry-python/issues/2464)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Mitigate CPU spikes when sending lots of events with lots of data ([#2449](https://togithub.com/getsentry/sentry-python/issues/2449)) by [@antonpirker](https://togithub.com/antonpirker)
- Make `debug` option also configurable via environment ([#2450](https://togithub.com/getsentry/sentry-python/issues/2450)) by [@antonpirker](https://togithub.com/antonpirker)
- Make sure `get_dsn_parameters` is an actual function ([#2441](https://togithub.com/getsentry/sentry-python/issues/2441)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump pytest-localserver, add compat comment ([#2448](https://togithub.com/getsentry/sentry-python/issues/2448)) by [@sentrivana](https://togithub.com/sentrivana)
- AWS Lambda: Update compatible runtimes for AWS Lambda layer ([#2453](https://togithub.com/getsentry/sentry-python/issues/2453)) by [@antonpirker](https://togithub.com/antonpirker)
- AWS Lambda: Load AWS Lambda secrets in Github CI ([#2153](https://togithub.com/getsentry/sentry-python/issues/2153)) by [@antonpirker](https://togithub.com/antonpirker)
- Redis: Connection attributes in `redis` database spans ([#2398](https://togithub.com/getsentry/sentry-python/issues/2398)) by [@antonpirker](https://togithub.com/antonpirker)
- Falcon: Falcon integration checks response status before reporting error ([#2465](https://togithub.com/getsentry/sentry-python/issues/2465)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Quart: Support Quart 0.19 onwards ([#2403](https://togithub.com/getsentry/sentry-python/issues/2403)) by [@pgjones](https://togithub.com/pgjones)
- Sanic: Sanic integration initial version ([#2419](https://togithub.com/getsentry/sentry-python/issues/2419)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Django: Fix parsing of Django `path` patterns ([#2452](https://togithub.com/getsentry/sentry-python/issues/2452)) by [@sentrivana](https://togithub.com/sentrivana)
- Django: Add Django 4.2 to test suite ([#2462](https://togithub.com/getsentry/sentry-python/issues/2462)) by [@sentrivana](https://togithub.com/sentrivana)
- Polish changelog ([#2434](https://togithub.com/getsentry/sentry-python/issues/2434)) by [@sentrivana](https://togithub.com/sentrivana)
- Update CONTRIBUTING.md ([#2443](https://togithub.com/getsentry/sentry-python/issues/2443)) by [@krishvsoni](https://togithub.com/krishvsoni)
- Update README.md ([#2435](https://togithub.com/getsentry/sentry-python/issues/2435)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.32.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1320)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.31.0...1.32.0)
##### Various fixes & improvements
- **New:** Error monitoring for some of the most popular Python GraphQL libraries:
- Add [GQL GraphQL integration](https://docs.sentry.io/platforms/python/integrations/gql/) ([#2368](https://togithub.com/getsentry/sentry-python/issues/2368)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.gql import GQLIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
GQLIntegration(),
],
)
```
- Add [Graphene GraphQL error integration](https://docs.sentry.io/platforms/python/integrations/graphene/) ([#2389](https://togithub.com/getsentry/sentry-python/issues/2389)) by [@sentrivana](https://togithub.com/sentrivana)
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.graphene import GrapheneIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
GrapheneIntegration(),
],
)
```
- Add [Strawberry GraphQL error & tracing integration](https://docs.sentry.io/platforms/python/integrations/strawberry/) ([#2393](https://togithub.com/getsentry/sentry-python/issues/2393)) by [@sentrivana](https://togithub.com/sentrivana)
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.strawberry import StrawberryIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
```
### make sure to set async_execution to False if you're executing
### GraphQL queries synchronously
StrawberryIntegration(async_execution=True),
],
traces_sample_rate=1.0,
)
```
- Add [Ariadne GraphQL error integration](https://docs.sentry.io/platforms/python/integrations/ariadne/) ([#2387](https://togithub.com/getsentry/sentry-python/issues/2387)) by [@sentrivana](https://togithub.com/sentrivana)
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.ariadne import AriadneIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
AriadneIntegration(),
],
)
```
- Capture multiple named groups again ([#2432](https://togithub.com/getsentry/sentry-python/issues/2432)) by [@sentrivana](https://togithub.com/sentrivana)
- Don't fail when upstream scheme is unusual ([#2371](https://togithub.com/getsentry/sentry-python/issues/2371)) by [@vanschelven](https://togithub.com/vanschelven)
- Support new RQ version ([#2405](https://togithub.com/getsentry/sentry-python/issues/2405)) by [@antonpirker](https://togithub.com/antonpirker)
- Remove `utcnow`, `utcfromtimestamp` deprecated in Python 3.12 ([#2415](https://togithub.com/getsentry/sentry-python/issues/2415)) by [@rmad17](https://togithub.com/rmad17)
- Add `trace` to `__all__` in top-level `__init__.py` ([#2401](https://togithub.com/getsentry/sentry-python/issues/2401)) by [@lobsterkatie](https://togithub.com/lobsterkatie)
- Move minimetrics code to the SDK ([#2385](https://togithub.com/getsentry/sentry-python/issues/2385)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Add configurable compression levels ([#2382](https://togithub.com/getsentry/sentry-python/issues/2382)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Shift flushing by up to a rollup window ([#2396](https://togithub.com/getsentry/sentry-python/issues/2396)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Make a consistent noop flush behavior ([#2428](https://togithub.com/getsentry/sentry-python/issues/2428)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Stronger recursion protection ([#2426](https://togithub.com/getsentry/sentry-python/issues/2426)) by [@mitsuhiko](https://togithub.com/mitsuhiko)
- Remove `OpenTelemetryIntegration` from `__init__.py` ([#2379](https://togithub.com/getsentry/sentry-python/issues/2379)) by [@sentrivana](https://togithub.com/sentrivana)
- Update API docs ([#2397](https://togithub.com/getsentry/sentry-python/issues/2397)) by [@antonpirker](https://togithub.com/antonpirker)
- Pin some test requirements because new majors break our tests ([#2404](https://togithub.com/getsentry/sentry-python/issues/2404)) by [@antonpirker](https://togithub.com/antonpirker)
- Run more `requests`, `celery`, `falcon` tests ([#2414](https://togithub.com/getsentry/sentry-python/issues/2414)) by [@sentrivana](https://togithub.com/sentrivana)
- Move `importorskip`s in tests to `__init__.py` files ([#2412](https://togithub.com/getsentry/sentry-python/issues/2412)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix `mypy` errors ([#2433](https://togithub.com/getsentry/sentry-python/issues/2433)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix pre-commit issues ([#2424](https://togithub.com/getsentry/sentry-python/issues/2424)) by [@bukzor-sentryio](https://togithub.com/bukzor-sentryio)
- Update [CONTRIBUTING.md](https://togithub.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md) ([#2411](https://togithub.com/getsentry/sentry-python/issues/2411)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump `sphinx` from 7.2.5 to 7.2.6 ([#2378](https://togithub.com/getsentry/sentry-python/issues/2378)) by [@dependabot](https://togithub.com/dependabot)
- \[Experimental] Add explain plan to DB spans ([#2315](https://togithub.com/getsentry/sentry-python/issues/2315)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.31.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1310)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.30.0...1.31.0)
##### Various fixes & improvements
- **New:** Add integration for `clickhouse-driver` ([#2167](https://togithub.com/getsentry/sentry-python/issues/2167)) by [@mimre25](https://togithub.com/mimre25)
For more information, see the documentation for [clickhouse-driver](https://docs.sentry.io/platforms/python/configuration/integrations/clickhouse-driver) for more information.
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
ClickhouseDriverIntegration(),
],
)
```
- **New:** Add integration for `asyncpg` ([#2314](https://togithub.com/getsentry/sentry-python/issues/2314)) by [@mimre25](https://togithub.com/mimre25)
For more information, see the documentation for [asyncpg](https://docs.sentry.io/platforms/python/configuration/integrations/asyncpg/) for more information.
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.asyncpg import AsyncPGIntegration
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
AsyncPGIntegration(),
],
)
```
- **New:** Allow to override `propagate_traces` in `Celery` per task ([#2331](https://togithub.com/getsentry/sentry-python/issues/2331)) by [@jan-auer](https://togithub.com/jan-auer)
For more information, see the documentation for [Celery](https://docs.sentry.io//platforms/python/guides/celery/#distributed-traces) for more information.
Usage:
```python
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
```
### Enable global distributed traces (this is the default, just to be explicit.)
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
CeleryIntegration(propagate_traces=True),
],
)
...
### This will NOT propagate the trace. (The task will start its own trace):
my_task_b.apply_async(
args=("some_parameter", ),
headers={"sentry-propagate-traces": False},
)
```
- Prevent Falcon integration from breaking ASGI apps (#2359) by @szokeasaurusrex
- Backpressure: only downsample a max of 10 times (#2347) by @sl0thentr0py
- Made NoOpSpan compatible to Transactions. (#2364) by @antonpirker
- Cleanup ASGI integration (#2335) by @antonpirker
- Pin anyio in tests (dep of httpx), because new major 4.0.0 breaks tests. (#2336) by @antonpirker
- Added link to backpressure section in docs. (#2354) by @antonpirker
- Add .vscode to .gitignore (#2317) by @shoaib-mohd
- Documenting Spans and Transactions (#2358) by @antonpirker
- Fix in profiler: do not call getcwd from module root (#2329) by @Zylphrex
- Fix deprecated version attribute (#2338) by @vagi8
- Fix transaction name in Starlette and FastAPI (#2341) by @antonpirker
- Fix tests using Postgres (#2362) by @antonpirker
- build(deps): Updated linting tooling (#2350) by @antonpirker
- build(deps): bump sphinx from 7.2.4 to 7.2.5 (#2344) by @dependabot
- build(deps): bump actions/checkout from 2 to 4 (#2352) by @dependabot
- build(deps): bump checkouts/data-schemas from `ebc77d3` to `68def1e` (#2351) by @dependabot
```
### [`v1.30.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1300)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.2...1.30.0)
##### Various fixes & improvements
- Officially support Python 3.11 ([#2300](https://togithub.com/getsentry/sentry-python/issues/2300)) by [@sentrivana](https://togithub.com/sentrivana)
- Context manager monitor ([#2290](https://togithub.com/getsentry/sentry-python/issues/2290)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Set response status code in transaction `response` context. ([#2312](https://togithub.com/getsentry/sentry-python/issues/2312)) by [@antonpirker](https://togithub.com/antonpirker)
- Add missing context kwarg to `_sentry_task_factory` ([#2267](https://togithub.com/getsentry/sentry-python/issues/2267)) by [@JohnnyDeuss](https://togithub.com/JohnnyDeuss)
- In Postgres take the connection params from the connection ([#2308](https://togithub.com/getsentry/sentry-python/issues/2308)) by [@antonpirker](https://togithub.com/antonpirker)
- Experimental: Allow using OTel for performance instrumentation ([#2272](https://togithub.com/getsentry/sentry-python/issues/2272)) by [@sentrivana](https://togithub.com/sentrivana)
This release includes experimental support for replacing Sentry's default
performance monitoring solution with one powered by OpenTelemetry without having
to do any manual setup.
Try it out by installing `pip install sentry-sdk[opentelemetry-experimental]` and
then initializing the SDK with:
```python
sentry_sdk.init(
```
### ...your usual options...
_experiments={"otel_powered_performance": True},
)
```
This enables OpenTelemetry performance monitoring support for some of the most
popular frameworks and libraries (Flask, Django, FastAPI, requests...).
We're looking forward to your feedback! Please let us know about your experience
in this discussion: https://github.com/getsentry/sentry/discussions/55023
**Important note:** Please note that this feature is experimental and in a
proof-of-concept stage and is not meant for production use. It may be changed or
removed at any point.
- Enable backpressure handling by default ([#2298](https://togithub.com/getsentry/sentry-python/issues/2298)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py)
The SDK now dynamically downsamples transactions to reduce backpressure in high
throughput systems. It starts a new `Monitor` thread to perform some health checks
which decide to downsample (halved each time) in 10 second intervals till the system
is healthy again.
To disable this behavior, use:
```python
sentry_sdk.init(
```
### ...your usual options...
enable_backpressure_handling=False,
)
```
If your system serves heavy load, please let us know how this feature works for you!
Check out the [documentation](https://docs.sentry.io/platforms/python/configuration/options/#enable-backpressure-handling) for more information.
- Stop recording spans for internal web requests to Sentry ([#2297](https://togithub.com/getsentry/sentry-python/issues/2297)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Add test for `ThreadPoolExecutor` ([#2259](https://togithub.com/getsentry/sentry-python/issues/2259)) by [@gggritso](https://togithub.com/gggritso)
- Add docstrings for `Scope.update_from_*` ([#2311](https://togithub.com/getsentry/sentry-python/issues/2311)) by [@sentrivana](https://togithub.com/sentrivana)
- Moved `is_sentry_url` to utils ([#2304](https://togithub.com/getsentry/sentry-python/issues/2304)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Fix: arq attribute error on settings, support worker args ([#2260](https://togithub.com/getsentry/sentry-python/issues/2260)) by [@rossmacarthur](https://togithub.com/rossmacarthur)
- Fix: Exceptions include detail property for their value ([#2193](https://togithub.com/getsentry/sentry-python/issues/2193)) by [@nicolassanmar](https://togithub.com/nicolassanmar)
- build(deps): bump mypy from 1.4.1 to 1.5.1 ([#2319](https://togithub.com/getsentry/sentry-python/issues/2319)) by [@dependabot](https://togithub.com/dependabot)
- build(deps): bump sphinx from 7.1.2 to 7.2.4 ([#2322](https://togithub.com/getsentry/sentry-python/issues/2322)) by [@dependabot](https://togithub.com/dependabot)
- build(deps): bump sphinx from 7.0.1 to 7.1.2 ([#2296](https://togithub.com/getsentry/sentry-python/issues/2296)) by [@dependabot](https://togithub.com/dependabot)
- build(deps): bump checkouts/data-schemas from `1b85152` to `ebc77d3` ([#2254](https://togithub.com/getsentry/sentry-python/issues/2254)) by [@dependabot](https://togithub.com/dependabot)
### [`v1.29.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1292)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.1...1.29.2)
##### Various fixes & improvements
- Revert GraphQL integration ([#2287](https://togithub.com/getsentry/sentry-python/issues/2287)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.29.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1291)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.0...1.29.1)
##### Various fixes & improvements
- Fix GraphQL integration swallowing responses ([#2286](https://togithub.com/getsentry/sentry-python/issues/2286)) by [@sentrivana](https://togithub.com/sentrivana)
- Fix typo ([#2283](https://togithub.com/getsentry/sentry-python/issues/2283)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.29.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1290)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.28.1...1.29.0)
##### Various fixes & improvements
- Capture GraphQL client errors ([#2243](https://togithub.com/getsentry/sentry-python/issues/2243)) by [@sentrivana](https://togithub.com/sentrivana)
- The SDK will now create dedicated errors whenever an HTTP client makes a request to a `/graphql` endpoint and the response contains an error. You can opt out of this by providing `capture_graphql_errors=False` to the HTTP client integration.
- Read MAX_VALUE_LENGTH from client options ([#2121](https://togithub.com/getsentry/sentry-python/issues/2121)) ([#2171](https://togithub.com/getsentry/sentry-python/issues/2171)) by [@puittenbroek](https://togithub.com/puittenbroek)
- Rename `request_bodies` to `max_request_body_size` ([#2247](https://togithub.com/getsentry/sentry-python/issues/2247)) by [@mgaligniana](https://togithub.com/mgaligniana)
- Always sample checkin regardless of `sample_rate` ([#2279](https://togithub.com/getsentry/sentry-python/issues/2279)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Add information to short-interval cron error message ([#2246](https://togithub.com/getsentry/sentry-python/issues/2246)) by [@lobsterkatie](https://togithub.com/lobsterkatie)
- Add DB connection attributes in spans ([#2274](https://togithub.com/getsentry/sentry-python/issues/2274)) by [@antonpirker](https://togithub.com/antonpirker)
- Add `db.system` to remaining Redis spans ([#2271](https://togithub.com/getsentry/sentry-python/issues/2271)) by [@AbhiPrasad](https://togithub.com/AbhiPrasad)
- Clarified the procedure for running tests ([#2276](https://togithub.com/getsentry/sentry-python/issues/2276)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex)
- Fix Chalice tests ([#2278](https://togithub.com/getsentry/sentry-python/issues/2278)) by [@sentrivana](https://togithub.com/sentrivana)
- Bump Black from 23.3.0 to 23.7.0 ([#2256](https://togithub.com/getsentry/sentry-python/issues/2256)) by [@dependabot](https://togithub.com/dependabot)
- Remove py3.4 from tox.ini ([#2248](https://togithub.com/getsentry/sentry-python/issues/2248)) by [@sentrivana](https://togithub.com/sentrivana)
### [`v1.28.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1281)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.28.0...1.28.1)
##### Various fixes & improvements
- Redis: Add support for redis.asyncio ([#1933](https://togithub.com/getsentry/sentry-python/issues/1933)) by [@Zhenay](https://togithub.com/Zhenay)
- Make sure each task that is started by Celery Beat has its own trace. ([#2249](https://togithub.com/getsentry/sentry-python/issues/2249)) by [@antonpirker](https://togithub.com/antonpirker)
- Add Sampling Decision to Trace Envelope Header ([#2239](https://togithub.com/getsentry/sentry-python/issues/2239)) by [@antonpirker](https://togithub.com/antonpirker)
- Do not add trace headers (`sentry-trace` and `baggage`) to HTTP requests to Sentry ([#2240](https://togithub.com/getsentry/sentry-python/issues/2240)) by [@antonpirker](https://togithub.com/antonpirker)
- Prevent adding `sentry-trace` header multiple times ([#2235](https://togithub.com/getsentry/sentry-python/issues/2235)) by [@antonpirker](https://togithub.com/antonpirker)
- Skip distributions with incomplete metadata ([#2231](https://togithub.com/getsentry/sentry-python/issues/2231)) by [@rominf](https://togithub.com/rominf)
- Remove stale.yml ([#2245](https://togithub.com/getsentry/sentry-python/issues/2245)) by [@hubertdeng123](https://togithub.com/hubertdeng123)
- Django: Fix 404 Handler handler being labeled as "generic ASGI request" ([#1277](https://togithub.com/getsentry/sentry-python/issues/1277)) by [@BeryJu](https://togithub.com/BeryJu)
### [`v1.28.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1280)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.27.1...1.28.0)
##### Various fixes & improvements
- Add support for cron jobs in ARQ integration ([#2088](https://togithub.com/getsentry/sentry-python/issues/2088)) by [@lewazo](https://togithub.com/lewazo)
- Backpressure handling prototype ([#2189](https://togithub.com/getsentry/sentry-python/issues/2189)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py)
- Add "replay" context to event payload ([#2234](https://togithub.com/getsentry/sentry-python/issues/2234)) by [@antonpirker](https://togithub.com/antonpirker)
- Update test Django app to be compatible for Django 4.x ([#1794](https://togithub.com/getsentry/sentry-python/issues/1794)) by [@DilLip-Chowdary-Codes](https://togithub.com/DilLip-Chowdary-Codes)
### [`v1.27.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1271)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.27.0...1.27.1)
##### Various fixes & improvements
- Add Starlette/FastAPI template tag for adding Sentry tracing information ([#2225](https://togithub.com/getsentry/sentry-python/issues/2225)) by [@antonpirker](https://togithub.com/antonpirker)
- By adding `{{ sentry_trace_meta }}` to your Starlette/FastAPI Jinja2 templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend.
- Fixed generation of baggage when a DSC is already in propagation context ([#2232](https://togithub.com/getsentry/sentry-python/issues/2232)) by [@antonpirker](https://togithub.com/antonpirker)
- Handle explicitly passing `None` for `trace_configs` in `aiohttp` ([#2230](https://togithub.com/getsentry/sentry-python/issues/2230)) by [@Harmon758](https://togithub.com/Harmon758)
- Support newest Starlette versions ([#2227](https://togithub.com/getsentry/sentry-python/issues/2227)) by [@antonpirker](https://togithub.com/antonpirker)
### [`v1.27.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1270)
[Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.26.0...1.27.0)
##### Various fixes & improvements
- Support for SQLAlchemy 2.0 ([#2200](https://togithub.com/getsentry/sentry-python/issues/2200)) by [@antonpirker](https://togithub.com/antonpirker)
- Add instrumentation of `aiohttp` client requests ([#1761](https://togithub.com/getsentry/sentry-python/issues/1761)) by [@md384](https://togithub.com/md384)
- Add Django template tag for adding Sentry tracing information ([#2222](https://togithub.com/getsentry/sentry-python/issues/2222)) by [@antonpirker](https://togithub.com/antonpirker)
- By adding `{{ sentry_trace_meta }}` to your Django templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend.
- Update Flask HTML meta helper ([#2203](https://togithub.com/getsentry/sentry-python/issues/2203)) by [@antonpirker](https://togithub.com/antonpirker)
- Take trace ID always from propagation context ([#2209](https://togithub.com/getsentry/sentry-python/issues/2209)) by [@antonpirker](https://togithub.com/antonpirker)
- Fix trace context in event payload ([#2205](https://togithub.com/getsentry/sentry-python/issues/2205)) by [@antonpirker](https://togithub.com/antonpirker)
- Use new top level
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
==1.15.0
->==1.45.0
Release Notes
getsentry/sentry-python (sentry-sdk)
### [`v1.45.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1450) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.44.1...1.45.0) This is the final 1.x release for the forseeable future. Development will continue on the 2.x release line. The first 2.x version will be available in the next few weeks. ##### Various fixes & improvements - Allow to upsert monitors ([#2929](https://togithub.com/getsentry/sentry-python/issues/2929)) by [@sentrivana](https://togithub.com/sentrivana) It's now possible to provide `monitor_config` to the `monitor` decorator/context manager directly: ```python from sentry_sdk.crons import monitor ``` ### [`v1.44.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1441) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.44.0...1.44.1) ##### Various fixes & improvements - Make `monitor` async friendly ([#2912](https://togithub.com/getsentry/sentry-python/issues/2912)) by [@sentrivana](https://togithub.com/sentrivana) You can now decorate your async functions with the `monitor` decorator and they will correctly report their duration and completion status. - Fixed `Event | None` runtime `TypeError` ([#2928](https://togithub.com/getsentry/sentry-python/issues/2928)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) ### [`v1.44.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1440) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.43.0...1.44.0) ##### Various fixes & improvements - ref: Define types at runtime ([#2914](https://togithub.com/getsentry/sentry-python/issues/2914)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Explicit reexport of types ([#2866](https://togithub.com/getsentry/sentry-python/issues/2866)) ([#2913](https://togithub.com/getsentry/sentry-python/issues/2913)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - feat(profiling): Add thread data to spans ([#2843](https://togithub.com/getsentry/sentry-python/issues/2843)) by [@Zylphrex](https://togithub.com/Zylphrex) ### [`v1.43.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1430) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.42.0...1.43.0) ##### Various fixes & improvements - Add optional `keep_alive` ([#2842](https://togithub.com/getsentry/sentry-python/issues/2842)) by [@sentrivana](https://togithub.com/sentrivana) If you're experiencing frequent network issues between the SDK and Sentry, you can try turning on TCP keep-alive: ```python import sentry_sdk sentry_sdk.init( ``` ### ...your usual settings... keep_alive=True, ) ``` - Add support for Celery Redbeat cron tasks (#2643) by @kwigley The SDK now supports the Redbeat scheduler in addition to the default Celery Beat scheduler for auto instrumenting crons. See [the docs](https://docs.sentry.io/platforms/python/integrations/celery/crons/) for more information about how to set this up. - `aws_event` can be an empty list (#2849) by @sentrivana - Re-export `Event` in `types.py` (#2829) by @szokeasaurusrex - Small API docs improvement (#2828) by @antonpirker - Fixed OpenAI tests (#2834) by @antonpirker - Bump `checkouts/data-schemas` from `ed078ed` to `8232f17` (#2832) by @dependabot ``` ### [`v1.42.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1420) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.41.0...1.42.0) ##### Various fixes & improvements - **New integration:** [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/) ([#2791](https://togithub.com/getsentry/sentry-python/issues/2791)) by [@colin-sentry](https://togithub.com/colin-sentry) We added an integration for OpenAI to capture errors and also performance data when using the OpenAI Python SDK. Useage: This integrations is auto-enabling, so if you have the `openai` package in your project it will be enabled. Just initialize Sentry before you create your OpenAI client. ```python from openai import OpenAI import sentry_sdk sentry_sdk.init( dsn="___PUBLIC_DSN___", enable_tracing=True, traces_sample_rate=1.0, ) client = OpenAI() ``` For more information, see the documentation for [OpenAI integration](https://docs.sentry.io/platforms/python/integrations/openai/). - Discard open OpenTelemetry spans after 10 minutes ([#2801](https://togithub.com/getsentry/sentry-python/issues/2801)) by [@antonpirker](https://togithub.com/antonpirker) - Propagate sentry-trace and baggage headers to Huey tasks ([#2792](https://togithub.com/getsentry/sentry-python/issues/2792)) by [@cnschn](https://togithub.com/cnschn) - Added Event type ([#2753](https://togithub.com/getsentry/sentry-python/issues/2753)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Improve scrub_dict typing ([#2768](https://togithub.com/getsentry/sentry-python/issues/2768)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Dependencies: bump types-protobuf from 4.24.0.20240302 to 4.24.0.20240311 ([#2797](https://togithub.com/getsentry/sentry-python/issues/2797)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.41.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1410) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.6...1.41.0) ##### Various fixes & improvements - Add recursive scrubbing to `EventScrubber` ([#2755](https://togithub.com/getsentry/sentry-python/issues/2755)) by [@Cheapshot003](https://togithub.com/Cheapshot003) By default, the `EventScrubber` will not search your events for potential PII recursively. With this release, you can enable this behavior with: ```python import sentry_sdk from sentry_sdk.scrubber import EventScrubber sentry_sdk.init( ``` ### ...your usual settings... event_scrubber=EventScrubber(recursive=True), ) ```` - Expose `socket_options` (#2786) by @sentrivana If the SDK is experiencing connection issues (connection resets, server closing connection without response, etc.) while sending events to Sentry, tweaking the default `urllib3` socket options to the following can help: ```python import socket from urllib3.connection import HTTPConnection import sentry_sdk sentry_sdk.init( ### ...your usual settings... socket_options=HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), ### note: skip the following line if you're on MacOS since TCP_KEEPIDLE doesn't exist there (socket.SOL_TCP, socket.TCP_KEEPIDLE, 45), (socket.SOL_TCP, socket.TCP_KEEPINTVL, 10), (socket.SOL_TCP, socket.TCP_KEEPCNT, 6), ], ) ```` - Allow to configure merge target for releases ([#2777](https://togithub.com/getsentry/sentry-python/issues/2777)) by [@sentrivana](https://togithub.com/sentrivana) - Allow empty character in metric tags values ([#2775](https://togithub.com/getsentry/sentry-python/issues/2775)) by [@viglia](https://togithub.com/viglia) - Replace invalid tag values with an empty string instead of \_ ([#2773](https://togithub.com/getsentry/sentry-python/issues/2773)) by [@markushi](https://togithub.com/markushi) - Add documentation comment to `scrub_list` ([#2769](https://togithub.com/getsentry/sentry-python/issues/2769)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Fixed regex to parse version in lambda package file ([#2767](https://togithub.com/getsentry/sentry-python/issues/2767)) by [@antonpirker](https://togithub.com/antonpirker) - xfail broken AWS Lambda tests for now ([#2794](https://togithub.com/getsentry/sentry-python/issues/2794)) by [@sentrivana](https://togithub.com/sentrivana) - Removed print statements because it messes with the tests ([#2789](https://togithub.com/getsentry/sentry-python/issues/2789)) by [@antonpirker](https://togithub.com/antonpirker) - Bump `types-protobuf` from 4.24.0.20240129 to 4.24.0.20240302 ([#2782](https://togithub.com/getsentry/sentry-python/issues/2782)) by [@dependabot](https://togithub.com/dependabot) - Bump `checkouts/data-schemas` from `eb941c2` to `ed078ed` ([#2781](https://togithub.com/getsentry/sentry-python/issues/2781)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.40.6`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1406) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.5...1.40.6) ##### Various fixes & improvements - Fix compatibility with `greenlet`/`gevent` ([#2756](https://togithub.com/getsentry/sentry-python/issues/2756)) by [@sentrivana](https://togithub.com/sentrivana) - Fix query source relative filepath ([#2717](https://togithub.com/getsentry/sentry-python/issues/2717)) by [@gggritso](https://togithub.com/gggritso) - Support `clickhouse-driver==0.2.7` ([#2752](https://togithub.com/getsentry/sentry-python/issues/2752)) by [@sentrivana](https://togithub.com/sentrivana) - Bump `checkouts/data-schemas` from `6121fd3` to `eb941c2` ([#2747](https://togithub.com/getsentry/sentry-python/issues/2747)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.40.5`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1405) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.4...1.40.5) ##### Various fixes & improvements - Deprecate `last_event_id()`. ([#2749](https://togithub.com/getsentry/sentry-python/issues/2749)) by [@antonpirker](https://togithub.com/antonpirker) - Warn if uWSGI is set up without proper thread support ([#2738](https://togithub.com/getsentry/sentry-python/issues/2738)) by [@sentrivana](https://togithub.com/sentrivana) uWSGI has to be run in threaded mode for the SDK to run properly. If this is not the case, the consequences could range from features not working unexpectedly to uWSGI workers crashing. Please make sure to run uWSGI with both `--enable-threads` and `--py-call-uwsgi-fork-hooks`. - `parsed_url` can be `None` ([#2734](https://togithub.com/getsentry/sentry-python/issues/2734)) by [@sentrivana](https://togithub.com/sentrivana) - Python 3.7 is not supported anymore by Lambda, so removed it and added 3.12 ([#2729](https://togithub.com/getsentry/sentry-python/issues/2729)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.40.4`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1404) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.3...1.40.4) ##### Various fixes & improvements - Only start metrics flusher thread on demand ([#2727](https://togithub.com/getsentry/sentry-python/issues/2727)) by [@sentrivana](https://togithub.com/sentrivana) - Bump checkouts/data-schemas from `aa7058c` to `6121fd3` ([#2724](https://togithub.com/getsentry/sentry-python/issues/2724)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.40.3`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1403) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.2...1.40.3) ##### Various fixes & improvements - Turn off metrics for uWSGI ([#2720](https://togithub.com/getsentry/sentry-python/issues/2720)) by [@sentrivana](https://togithub.com/sentrivana) - Minor improvements ([#2714](https://togithub.com/getsentry/sentry-python/issues/2714)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.40.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1402) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.1...1.40.2) ##### Various fixes & improvements - test: Fix `pytest` error ([#2712](https://togithub.com/getsentry/sentry-python/issues/2712)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - build(deps): bump types-protobuf from 4.24.0.4 to 4.24.0.20240129 ([#2691](https://togithub.com/getsentry/sentry-python/issues/2691)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.40.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1401) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.40.0...1.40.1) ##### Various fixes & improvements - Fix uWSGI workers hanging ([#2694](https://togithub.com/getsentry/sentry-python/issues/2694)) by [@sentrivana](https://togithub.com/sentrivana) - Make metrics work with `gevent` ([#2694](https://togithub.com/getsentry/sentry-python/issues/2694)) by [@sentrivana](https://togithub.com/sentrivana) - Guard against `engine.url` being `None` ([#2708](https://togithub.com/getsentry/sentry-python/issues/2708)) by [@sentrivana](https://togithub.com/sentrivana) - Fix performance regression in `sentry_sdk.utils._generate_installed_modules` ([#2703](https://togithub.com/getsentry/sentry-python/issues/2703)) by [@GlenWalker](https://togithub.com/GlenWalker) - Guard against Sentry initialization mid SQLAlchemy cursor ([#2702](https://togithub.com/getsentry/sentry-python/issues/2702)) by [@apmorton](https://togithub.com/apmorton) - Fix yaml generation script ([#2695](https://togithub.com/getsentry/sentry-python/issues/2695)) by [@sentrivana](https://togithub.com/sentrivana) - Fix AWS Lambda workflow ([#2710](https://togithub.com/getsentry/sentry-python/issues/2710)) by [@sentrivana](https://togithub.com/sentrivana) - Bump `codecov/codecov-action` from 3 to 4 ([#2706](https://togithub.com/getsentry/sentry-python/issues/2706)) by [@dependabot](https://togithub.com/dependabot) - Bump `actions/cache` from 3 to 4 ([#2661](https://togithub.com/getsentry/sentry-python/issues/2661)) by [@dependabot](https://togithub.com/dependabot) - Bump `actions/checkout` from 3.1.0 to 4.1.1 ([#2561](https://togithub.com/getsentry/sentry-python/issues/2561)) by [@dependabot](https://togithub.com/dependabot) - Bump `github/codeql-action` from 2 to 3 ([#2603](https://togithub.com/getsentry/sentry-python/issues/2603)) by [@dependabot](https://togithub.com/dependabot) - Bump `actions/setup-python` from 4 to 5 ([#2577](https://togithub.com/getsentry/sentry-python/issues/2577)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.40.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1400) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.2...1.40.0) ##### Various fixes & improvements - Enable metrics related settings by default ([#2685](https://togithub.com/getsentry/sentry-python/issues/2685)) by [@iambriccardo](https://togithub.com/iambriccardo) - Fix `UnicodeDecodeError` on Python 2 ([#2657](https://togithub.com/getsentry/sentry-python/issues/2657)) by [@sentrivana](https://togithub.com/sentrivana) - Enable DB query source by default ([#2629](https://togithub.com/getsentry/sentry-python/issues/2629)) by [@sentrivana](https://togithub.com/sentrivana) - Fix query source duration check ([#2675](https://togithub.com/getsentry/sentry-python/issues/2675)) by [@sentrivana](https://togithub.com/sentrivana) - Reformat with `black==24.1.0` ([#2680](https://togithub.com/getsentry/sentry-python/issues/2680)) by [@sentrivana](https://togithub.com/sentrivana) - Cleaning up existing code to prepare for new Scopes API ([#2611](https://togithub.com/getsentry/sentry-python/issues/2611)) by [@antonpirker](https://togithub.com/antonpirker) - Moved redis related tests to databases ([#2674](https://togithub.com/getsentry/sentry-python/issues/2674)) by [@antonpirker](https://togithub.com/antonpirker) - Improve `sentry_sdk.trace` type hints ([#2633](https://togithub.com/getsentry/sentry-python/issues/2633)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Bump `checkouts/data-schemas` from `e9f7d58` to `aa7058c` ([#2639](https://togithub.com/getsentry/sentry-python/issues/2639)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.39.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1392) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.1...1.39.2) ##### Various fixes & improvements - Fix timestamp in transaction created by OTel ([#2627](https://togithub.com/getsentry/sentry-python/issues/2627)) by [@antonpirker](https://togithub.com/antonpirker) - Fix relative path in DB query source ([#2624](https://togithub.com/getsentry/sentry-python/issues/2624)) by [@antonpirker](https://togithub.com/antonpirker) - Run more CI checks on 2.0 branch ([#2625](https://togithub.com/getsentry/sentry-python/issues/2625)) by [@sentrivana](https://togithub.com/sentrivana) - Fix tracing `TypeError` for static and class methods ([#2559](https://togithub.com/getsentry/sentry-python/issues/2559)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Fix missing `ctx` in Arq integration ([#2600](https://togithub.com/getsentry/sentry-python/issues/2600)) by [@ivanovart](https://togithub.com/ivanovart) - Change `data_category` from `check_in` to `monitor` ([#2598](https://togithub.com/getsentry/sentry-python/issues/2598)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.39.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1391) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.39.0...1.39.1) ##### Various fixes & improvements - Fix psycopg2 detection in the Django integration ([#2593](https://togithub.com/getsentry/sentry-python/issues/2593)) by [@sentrivana](https://togithub.com/sentrivana) - Filter out empty string releases ([#2591](https://togithub.com/getsentry/sentry-python/issues/2591)) by [@sentrivana](https://togithub.com/sentrivana) - Fixed local var not present when there is an error in a user's `error_sampler` function ([#2511](https://togithub.com/getsentry/sentry-python/issues/2511)) by [@antonpirker](https://togithub.com/antonpirker) - Fixed typing in `aiohttp` ([#2590](https://togithub.com/getsentry/sentry-python/issues/2590)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.39.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1390) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.38.0...1.39.0) ##### Various fixes & improvements - Add support for cluster clients from Redis SDK ([#2394](https://togithub.com/getsentry/sentry-python/issues/2394)) by [@md384](https://togithub.com/md384) - Improve location reporting for timer metrics ([#2552](https://togithub.com/getsentry/sentry-python/issues/2552)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Fix Celery `TypeError` with no-argument `apply_async` ([#2575](https://togithub.com/getsentry/sentry-python/issues/2575)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Fix Lambda integration with EventBridge source ([#2546](https://togithub.com/getsentry/sentry-python/issues/2546)) by [@davidcroda](https://togithub.com/davidcroda) - Add max tries to Spotlight ([#2571](https://togithub.com/getsentry/sentry-python/issues/2571)) by [@hazAT](https://togithub.com/hazAT) - Handle `os.path.devnull` access issues ([#2579](https://togithub.com/getsentry/sentry-python/issues/2579)) by [@sentrivana](https://togithub.com/sentrivana) - Change `code.filepath` frame picking logic ([#2568](https://togithub.com/getsentry/sentry-python/issues/2568)) by [@sentrivana](https://togithub.com/sentrivana) - Trigger AWS Lambda tests on label ([#2538](https://togithub.com/getsentry/sentry-python/issues/2538)) by [@sentrivana](https://togithub.com/sentrivana) - Run permissions step on pull_request_target but not push ([#2548](https://togithub.com/getsentry/sentry-python/issues/2548)) by [@sentrivana](https://togithub.com/sentrivana) - Hash AWS Lambda test functions based on current revision ([#2557](https://togithub.com/getsentry/sentry-python/issues/2557)) by [@sentrivana](https://togithub.com/sentrivana) - Update Django version in tests ([#2562](https://togithub.com/getsentry/sentry-python/issues/2562)) by [@sentrivana](https://togithub.com/sentrivana) - Make metrics tests non-flaky ([#2572](https://togithub.com/getsentry/sentry-python/issues/2572)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.38.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1380) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.37.1...1.38.0) ##### Various fixes & improvements - Only add trace context to checkins and do not run `event_processors` for checkins ([#2536](https://togithub.com/getsentry/sentry-python/issues/2536)) by [@antonpirker](https://togithub.com/antonpirker) - Metric span summaries ([#2522](https://togithub.com/getsentry/sentry-python/issues/2522)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Add source context to code locations ([#2539](https://togithub.com/getsentry/sentry-python/issues/2539)) by [@jan-auer](https://togithub.com/jan-auer) - Use in-app filepath instead of absolute path ([#2541](https://togithub.com/getsentry/sentry-python/issues/2541)) by [@antonpirker](https://togithub.com/antonpirker) - Switch to `jinja2` for generating CI yamls ([#2534](https://togithub.com/getsentry/sentry-python/issues/2534)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.37.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1371) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.37.0...1.37.1) ##### Various fixes & improvements - Fix `NameError` on `parse_version` with eventlet ([#2532](https://togithub.com/getsentry/sentry-python/issues/2532)) by [@sentrivana](https://togithub.com/sentrivana) - build(deps): bump checkouts/data-schemas from `68def1e` to `e9f7d58` ([#2501](https://togithub.com/getsentry/sentry-python/issues/2501)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.37.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1370) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.36.0...1.37.0) ##### Various fixes & improvements - Move installed modules code to utils ([#2429](https://togithub.com/getsentry/sentry-python/issues/2429)) by [@sentrivana](https://togithub.com/sentrivana) Note: We moved the internal function `_get_installed_modules` from `sentry_sdk.integrations.modules` to `sentry_sdk.utils`. So if you use this function you have to update your imports - Add code locations for metrics ([#2526](https://togithub.com/getsentry/sentry-python/issues/2526)) by [@jan-auer](https://togithub.com/jan-auer) - Add query source to DB spans ([#2521](https://togithub.com/getsentry/sentry-python/issues/2521)) by [@antonpirker](https://togithub.com/antonpirker) - Send events to Spotlight sidecar ([#2524](https://togithub.com/getsentry/sentry-python/issues/2524)) by [@HazAT](https://togithub.com/HazAT) - Run integration tests with newest `pytest` ([#2518](https://togithub.com/getsentry/sentry-python/issues/2518)) by [@sentrivana](https://togithub.com/sentrivana) - Bring tests up to date ([#2512](https://togithub.com/getsentry/sentry-python/issues/2512)) by [@sentrivana](https://togithub.com/sentrivana) - Fix: Prevent global var from being discarded at shutdown ([#2530](https://togithub.com/getsentry/sentry-python/issues/2530)) by [@antonpirker](https://togithub.com/antonpirker) - Fix: Scope transaction source not being updated in scope.span setter ([#2519](https://togithub.com/getsentry/sentry-python/issues/2519)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py) ### [`v1.36.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1360) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.35.0...1.36.0) ##### Various fixes & improvements - Django: Support Django 5.0 ([#2490](https://togithub.com/getsentry/sentry-python/issues/2490)) by [@sentrivana](https://togithub.com/sentrivana) - Django: Handling ASGI body in the right way. ([#2513](https://togithub.com/getsentry/sentry-python/issues/2513)) by [@antonpirker](https://togithub.com/antonpirker) - Flask: Test with Flask 3.0 ([#2506](https://togithub.com/getsentry/sentry-python/issues/2506)) by [@sentrivana](https://togithub.com/sentrivana) - Celery: Do not create a span when task is triggered by Celery Beat ([#2510](https://togithub.com/getsentry/sentry-python/issues/2510)) by [@antonpirker](https://togithub.com/antonpirker) - Redis: Ensure `RedisIntegration` is disabled, unless `redis` is installed ([#2504](https://togithub.com/getsentry/sentry-python/issues/2504)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Quart: Fix Quart integration for Quart 0.19.4 ([#2516](https://togithub.com/getsentry/sentry-python/issues/2516)) by [@antonpirker](https://togithub.com/antonpirker) - gRPC: Make async gRPC less noisy ([#2507](https://togithub.com/getsentry/sentry-python/issues/2507)) by [@jyggen](https://togithub.com/jyggen) ### [`v1.35.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1350) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.34.0...1.35.0) ##### Various fixes & improvements - **Updated gRPC integration:** Asyncio interceptors and easier setup ([#2369](https://togithub.com/getsentry/sentry-python/issues/2369)) by [@fdellekart](https://togithub.com/fdellekart) Our gRPC integration now instruments incoming unary-unary grpc requests and outgoing unary-unary, unary-stream grpc requests using grpcio channels. Everything works now for sync and async code. Before this release you had to add Sentry interceptors by hand to your gRPC code, now the only thing you need to do is adding the `GRPCIntegration` to you `sentry_sdk_init()` call. (See [documentation](https://docs.sentry.io/platforms/python/integrations/grpc/) for more information): ```python import sentry_sdk from sentry_sdk.integrations.grpc import GRPCIntegration sentry_sdk.init( dsn="___PUBLIC_DSN___", enable_tracing=True, integrations=[ GRPCIntegration(), ], ) ``` The old way still works, but we strongly encourage you to update your code to the way described above. - Python 3.12: Replace deprecated datetime functions ([#2502](https://togithub.com/getsentry/sentry-python/issues/2502)) by [@sentrivana](https://togithub.com/sentrivana) - Metrics: Unify datetime format ([#2409](https://togithub.com/getsentry/sentry-python/issues/2409)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Celery: Set correct data in `check_in`s ([#2500](https://togithub.com/getsentry/sentry-python/issues/2500)) by [@antonpirker](https://togithub.com/antonpirker) - Celery: Read timezone for Crons monitors from `celery_schedule` if existing ([#2497](https://togithub.com/getsentry/sentry-python/issues/2497)) by [@antonpirker](https://togithub.com/antonpirker) - Django: Removing redundant code in Django tests ([#2491](https://togithub.com/getsentry/sentry-python/issues/2491)) by [@vagi8](https://togithub.com/vagi8) - Django: Make reading the request body work in Django ASGI apps. ([#2495](https://togithub.com/getsentry/sentry-python/issues/2495)) by [@antonpirker](https://togithub.com/antonpirker) - FastAPI: Use wraps on fastapi request call wrapper ([#2476](https://togithub.com/getsentry/sentry-python/issues/2476)) by [@nkaras](https://togithub.com/nkaras) - Fix: Probe for psycopg2 and psycopg3 parameters function. ([#2492](https://togithub.com/getsentry/sentry-python/issues/2492)) by [@antonpirker](https://togithub.com/antonpirker) - Fix: Remove unnecessary TYPE_CHECKING alias ([#2467](https://togithub.com/getsentry/sentry-python/issues/2467)) by [@rafrafek](https://togithub.com/rafrafek) ### [`v1.34.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1340) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.33.1...1.34.0) ##### Various fixes & improvements - Added Python 3.12 support ([#2471](https://togithub.com/getsentry/sentry-python/issues/2471), [#2483](https://togithub.com/getsentry/sentry-python/issues/2483)) - Handle missing `connection_kwargs` in `patch_redis_client` ([#2482](https://togithub.com/getsentry/sentry-python/issues/2482)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Run common test suite on Python 3.12 ([#2479](https://togithub.com/getsentry/sentry-python/issues/2479)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.33.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1331) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.33.0...1.33.1) ##### Various fixes & improvements - Make parse_version work in utils.py itself. ([#2474](https://togithub.com/getsentry/sentry-python/issues/2474)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.33.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1330) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.32.0...1.33.0) ##### Various fixes & improvements - New: Added `error_sampler` option ([#2456](https://togithub.com/getsentry/sentry-python/issues/2456)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Python 3.12: Detect interpreter in shutdown state on thread spawn ([#2468](https://togithub.com/getsentry/sentry-python/issues/2468)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Patch eventlet under Sentry SDK ([#2464](https://togithub.com/getsentry/sentry-python/issues/2464)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Mitigate CPU spikes when sending lots of events with lots of data ([#2449](https://togithub.com/getsentry/sentry-python/issues/2449)) by [@antonpirker](https://togithub.com/antonpirker) - Make `debug` option also configurable via environment ([#2450](https://togithub.com/getsentry/sentry-python/issues/2450)) by [@antonpirker](https://togithub.com/antonpirker) - Make sure `get_dsn_parameters` is an actual function ([#2441](https://togithub.com/getsentry/sentry-python/issues/2441)) by [@sentrivana](https://togithub.com/sentrivana) - Bump pytest-localserver, add compat comment ([#2448](https://togithub.com/getsentry/sentry-python/issues/2448)) by [@sentrivana](https://togithub.com/sentrivana) - AWS Lambda: Update compatible runtimes for AWS Lambda layer ([#2453](https://togithub.com/getsentry/sentry-python/issues/2453)) by [@antonpirker](https://togithub.com/antonpirker) - AWS Lambda: Load AWS Lambda secrets in Github CI ([#2153](https://togithub.com/getsentry/sentry-python/issues/2153)) by [@antonpirker](https://togithub.com/antonpirker) - Redis: Connection attributes in `redis` database spans ([#2398](https://togithub.com/getsentry/sentry-python/issues/2398)) by [@antonpirker](https://togithub.com/antonpirker) - Falcon: Falcon integration checks response status before reporting error ([#2465](https://togithub.com/getsentry/sentry-python/issues/2465)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Quart: Support Quart 0.19 onwards ([#2403](https://togithub.com/getsentry/sentry-python/issues/2403)) by [@pgjones](https://togithub.com/pgjones) - Sanic: Sanic integration initial version ([#2419](https://togithub.com/getsentry/sentry-python/issues/2419)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Django: Fix parsing of Django `path` patterns ([#2452](https://togithub.com/getsentry/sentry-python/issues/2452)) by [@sentrivana](https://togithub.com/sentrivana) - Django: Add Django 4.2 to test suite ([#2462](https://togithub.com/getsentry/sentry-python/issues/2462)) by [@sentrivana](https://togithub.com/sentrivana) - Polish changelog ([#2434](https://togithub.com/getsentry/sentry-python/issues/2434)) by [@sentrivana](https://togithub.com/sentrivana) - Update CONTRIBUTING.md ([#2443](https://togithub.com/getsentry/sentry-python/issues/2443)) by [@krishvsoni](https://togithub.com/krishvsoni) - Update README.md ([#2435](https://togithub.com/getsentry/sentry-python/issues/2435)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.32.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1320) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.31.0...1.32.0) ##### Various fixes & improvements - **New:** Error monitoring for some of the most popular Python GraphQL libraries: - Add [GQL GraphQL integration](https://docs.sentry.io/platforms/python/integrations/gql/) ([#2368](https://togithub.com/getsentry/sentry-python/issues/2368)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) Usage: ```python import sentry_sdk from sentry_sdk.integrations.gql import GQLIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ GQLIntegration(), ], ) ``` - Add [Graphene GraphQL error integration](https://docs.sentry.io/platforms/python/integrations/graphene/) ([#2389](https://togithub.com/getsentry/sentry-python/issues/2389)) by [@sentrivana](https://togithub.com/sentrivana) Usage: ```python import sentry_sdk from sentry_sdk.integrations.graphene import GrapheneIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ GrapheneIntegration(), ], ) ``` - Add [Strawberry GraphQL error & tracing integration](https://docs.sentry.io/platforms/python/integrations/strawberry/) ([#2393](https://togithub.com/getsentry/sentry-python/issues/2393)) by [@sentrivana](https://togithub.com/sentrivana) Usage: ```python import sentry_sdk from sentry_sdk.integrations.strawberry import StrawberryIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ ``` ### make sure to set async_execution to False if you're executing ### GraphQL queries synchronously StrawberryIntegration(async_execution=True), ], traces_sample_rate=1.0, ) ``` - Add [Ariadne GraphQL error integration](https://docs.sentry.io/platforms/python/integrations/ariadne/) ([#2387](https://togithub.com/getsentry/sentry-python/issues/2387)) by [@sentrivana](https://togithub.com/sentrivana) Usage: ```python import sentry_sdk from sentry_sdk.integrations.ariadne import AriadneIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ AriadneIntegration(), ], ) ``` - Capture multiple named groups again ([#2432](https://togithub.com/getsentry/sentry-python/issues/2432)) by [@sentrivana](https://togithub.com/sentrivana) - Don't fail when upstream scheme is unusual ([#2371](https://togithub.com/getsentry/sentry-python/issues/2371)) by [@vanschelven](https://togithub.com/vanschelven) - Support new RQ version ([#2405](https://togithub.com/getsentry/sentry-python/issues/2405)) by [@antonpirker](https://togithub.com/antonpirker) - Remove `utcnow`, `utcfromtimestamp` deprecated in Python 3.12 ([#2415](https://togithub.com/getsentry/sentry-python/issues/2415)) by [@rmad17](https://togithub.com/rmad17) - Add `trace` to `__all__` in top-level `__init__.py` ([#2401](https://togithub.com/getsentry/sentry-python/issues/2401)) by [@lobsterkatie](https://togithub.com/lobsterkatie) - Move minimetrics code to the SDK ([#2385](https://togithub.com/getsentry/sentry-python/issues/2385)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Add configurable compression levels ([#2382](https://togithub.com/getsentry/sentry-python/issues/2382)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Shift flushing by up to a rollup window ([#2396](https://togithub.com/getsentry/sentry-python/issues/2396)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Make a consistent noop flush behavior ([#2428](https://togithub.com/getsentry/sentry-python/issues/2428)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Stronger recursion protection ([#2426](https://togithub.com/getsentry/sentry-python/issues/2426)) by [@mitsuhiko](https://togithub.com/mitsuhiko) - Remove `OpenTelemetryIntegration` from `__init__.py` ([#2379](https://togithub.com/getsentry/sentry-python/issues/2379)) by [@sentrivana](https://togithub.com/sentrivana) - Update API docs ([#2397](https://togithub.com/getsentry/sentry-python/issues/2397)) by [@antonpirker](https://togithub.com/antonpirker) - Pin some test requirements because new majors break our tests ([#2404](https://togithub.com/getsentry/sentry-python/issues/2404)) by [@antonpirker](https://togithub.com/antonpirker) - Run more `requests`, `celery`, `falcon` tests ([#2414](https://togithub.com/getsentry/sentry-python/issues/2414)) by [@sentrivana](https://togithub.com/sentrivana) - Move `importorskip`s in tests to `__init__.py` files ([#2412](https://togithub.com/getsentry/sentry-python/issues/2412)) by [@sentrivana](https://togithub.com/sentrivana) - Fix `mypy` errors ([#2433](https://togithub.com/getsentry/sentry-python/issues/2433)) by [@sentrivana](https://togithub.com/sentrivana) - Fix pre-commit issues ([#2424](https://togithub.com/getsentry/sentry-python/issues/2424)) by [@bukzor-sentryio](https://togithub.com/bukzor-sentryio) - Update [CONTRIBUTING.md](https://togithub.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md) ([#2411](https://togithub.com/getsentry/sentry-python/issues/2411)) by [@sentrivana](https://togithub.com/sentrivana) - Bump `sphinx` from 7.2.5 to 7.2.6 ([#2378](https://togithub.com/getsentry/sentry-python/issues/2378)) by [@dependabot](https://togithub.com/dependabot) - \[Experimental] Add explain plan to DB spans ([#2315](https://togithub.com/getsentry/sentry-python/issues/2315)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.31.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1310) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.30.0...1.31.0) ##### Various fixes & improvements - **New:** Add integration for `clickhouse-driver` ([#2167](https://togithub.com/getsentry/sentry-python/issues/2167)) by [@mimre25](https://togithub.com/mimre25) For more information, see the documentation for [clickhouse-driver](https://docs.sentry.io/platforms/python/configuration/integrations/clickhouse-driver) for more information. Usage: ```python import sentry_sdk from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ ClickhouseDriverIntegration(), ], ) ``` - **New:** Add integration for `asyncpg` ([#2314](https://togithub.com/getsentry/sentry-python/issues/2314)) by [@mimre25](https://togithub.com/mimre25) For more information, see the documentation for [asyncpg](https://docs.sentry.io/platforms/python/configuration/integrations/asyncpg/) for more information. Usage: ```python import sentry_sdk from sentry_sdk.integrations.asyncpg import AsyncPGIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ AsyncPGIntegration(), ], ) ``` - **New:** Allow to override `propagate_traces` in `Celery` per task ([#2331](https://togithub.com/getsentry/sentry-python/issues/2331)) by [@jan-auer](https://togithub.com/jan-auer) For more information, see the documentation for [Celery](https://docs.sentry.io//platforms/python/guides/celery/#distributed-traces) for more information. Usage: ```python import sentry_sdk from sentry_sdk.integrations.celery import CeleryIntegration ``` ### Enable global distributed traces (this is the default, just to be explicit.) sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ CeleryIntegration(propagate_traces=True), ], ) ... ### This will NOT propagate the trace. (The task will start its own trace): my_task_b.apply_async( args=("some_parameter", ), headers={"sentry-propagate-traces": False}, ) ``` - Prevent Falcon integration from breaking ASGI apps (#2359) by @szokeasaurusrex - Backpressure: only downsample a max of 10 times (#2347) by @sl0thentr0py - Made NoOpSpan compatible to Transactions. (#2364) by @antonpirker - Cleanup ASGI integration (#2335) by @antonpirker - Pin anyio in tests (dep of httpx), because new major 4.0.0 breaks tests. (#2336) by @antonpirker - Added link to backpressure section in docs. (#2354) by @antonpirker - Add .vscode to .gitignore (#2317) by @shoaib-mohd - Documenting Spans and Transactions (#2358) by @antonpirker - Fix in profiler: do not call getcwd from module root (#2329) by @Zylphrex - Fix deprecated version attribute (#2338) by @vagi8 - Fix transaction name in Starlette and FastAPI (#2341) by @antonpirker - Fix tests using Postgres (#2362) by @antonpirker - build(deps): Updated linting tooling (#2350) by @antonpirker - build(deps): bump sphinx from 7.2.4 to 7.2.5 (#2344) by @dependabot - build(deps): bump actions/checkout from 2 to 4 (#2352) by @dependabot - build(deps): bump checkouts/data-schemas from `ebc77d3` to `68def1e` (#2351) by @dependabot ``` ### [`v1.30.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1300) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.2...1.30.0) ##### Various fixes & improvements - Officially support Python 3.11 ([#2300](https://togithub.com/getsentry/sentry-python/issues/2300)) by [@sentrivana](https://togithub.com/sentrivana) - Context manager monitor ([#2290](https://togithub.com/getsentry/sentry-python/issues/2290)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Set response status code in transaction `response` context. ([#2312](https://togithub.com/getsentry/sentry-python/issues/2312)) by [@antonpirker](https://togithub.com/antonpirker) - Add missing context kwarg to `_sentry_task_factory` ([#2267](https://togithub.com/getsentry/sentry-python/issues/2267)) by [@JohnnyDeuss](https://togithub.com/JohnnyDeuss) - In Postgres take the connection params from the connection ([#2308](https://togithub.com/getsentry/sentry-python/issues/2308)) by [@antonpirker](https://togithub.com/antonpirker) - Experimental: Allow using OTel for performance instrumentation ([#2272](https://togithub.com/getsentry/sentry-python/issues/2272)) by [@sentrivana](https://togithub.com/sentrivana) This release includes experimental support for replacing Sentry's default performance monitoring solution with one powered by OpenTelemetry without having to do any manual setup. Try it out by installing `pip install sentry-sdk[opentelemetry-experimental]` and then initializing the SDK with: ```python sentry_sdk.init( ``` ### ...your usual options... _experiments={"otel_powered_performance": True}, ) ``` This enables OpenTelemetry performance monitoring support for some of the most popular frameworks and libraries (Flask, Django, FastAPI, requests...). We're looking forward to your feedback! Please let us know about your experience in this discussion: https://github.com/getsentry/sentry/discussions/55023 **Important note:** Please note that this feature is experimental and in a proof-of-concept stage and is not meant for production use. It may be changed or removed at any point. - Enable backpressure handling by default ([#2298](https://togithub.com/getsentry/sentry-python/issues/2298)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py) The SDK now dynamically downsamples transactions to reduce backpressure in high throughput systems. It starts a new `Monitor` thread to perform some health checks which decide to downsample (halved each time) in 10 second intervals till the system is healthy again. To disable this behavior, use: ```python sentry_sdk.init( ``` ### ...your usual options... enable_backpressure_handling=False, ) ``` If your system serves heavy load, please let us know how this feature works for you! Check out the [documentation](https://docs.sentry.io/platforms/python/configuration/options/#enable-backpressure-handling) for more information. - Stop recording spans for internal web requests to Sentry ([#2297](https://togithub.com/getsentry/sentry-python/issues/2297)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Add test for `ThreadPoolExecutor` ([#2259](https://togithub.com/getsentry/sentry-python/issues/2259)) by [@gggritso](https://togithub.com/gggritso) - Add docstrings for `Scope.update_from_*` ([#2311](https://togithub.com/getsentry/sentry-python/issues/2311)) by [@sentrivana](https://togithub.com/sentrivana) - Moved `is_sentry_url` to utils ([#2304](https://togithub.com/getsentry/sentry-python/issues/2304)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Fix: arq attribute error on settings, support worker args ([#2260](https://togithub.com/getsentry/sentry-python/issues/2260)) by [@rossmacarthur](https://togithub.com/rossmacarthur) - Fix: Exceptions include detail property for their value ([#2193](https://togithub.com/getsentry/sentry-python/issues/2193)) by [@nicolassanmar](https://togithub.com/nicolassanmar) - build(deps): bump mypy from 1.4.1 to 1.5.1 ([#2319](https://togithub.com/getsentry/sentry-python/issues/2319)) by [@dependabot](https://togithub.com/dependabot) - build(deps): bump sphinx from 7.1.2 to 7.2.4 ([#2322](https://togithub.com/getsentry/sentry-python/issues/2322)) by [@dependabot](https://togithub.com/dependabot) - build(deps): bump sphinx from 7.0.1 to 7.1.2 ([#2296](https://togithub.com/getsentry/sentry-python/issues/2296)) by [@dependabot](https://togithub.com/dependabot) - build(deps): bump checkouts/data-schemas from `1b85152` to `ebc77d3` ([#2254](https://togithub.com/getsentry/sentry-python/issues/2254)) by [@dependabot](https://togithub.com/dependabot) ### [`v1.29.2`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1292) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.1...1.29.2) ##### Various fixes & improvements - Revert GraphQL integration ([#2287](https://togithub.com/getsentry/sentry-python/issues/2287)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.29.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1291) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.29.0...1.29.1) ##### Various fixes & improvements - Fix GraphQL integration swallowing responses ([#2286](https://togithub.com/getsentry/sentry-python/issues/2286)) by [@sentrivana](https://togithub.com/sentrivana) - Fix typo ([#2283](https://togithub.com/getsentry/sentry-python/issues/2283)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.29.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1290) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.28.1...1.29.0) ##### Various fixes & improvements - Capture GraphQL client errors ([#2243](https://togithub.com/getsentry/sentry-python/issues/2243)) by [@sentrivana](https://togithub.com/sentrivana) - The SDK will now create dedicated errors whenever an HTTP client makes a request to a `/graphql` endpoint and the response contains an error. You can opt out of this by providing `capture_graphql_errors=False` to the HTTP client integration. - Read MAX_VALUE_LENGTH from client options ([#2121](https://togithub.com/getsentry/sentry-python/issues/2121)) ([#2171](https://togithub.com/getsentry/sentry-python/issues/2171)) by [@puittenbroek](https://togithub.com/puittenbroek) - Rename `request_bodies` to `max_request_body_size` ([#2247](https://togithub.com/getsentry/sentry-python/issues/2247)) by [@mgaligniana](https://togithub.com/mgaligniana) - Always sample checkin regardless of `sample_rate` ([#2279](https://togithub.com/getsentry/sentry-python/issues/2279)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Add information to short-interval cron error message ([#2246](https://togithub.com/getsentry/sentry-python/issues/2246)) by [@lobsterkatie](https://togithub.com/lobsterkatie) - Add DB connection attributes in spans ([#2274](https://togithub.com/getsentry/sentry-python/issues/2274)) by [@antonpirker](https://togithub.com/antonpirker) - Add `db.system` to remaining Redis spans ([#2271](https://togithub.com/getsentry/sentry-python/issues/2271)) by [@AbhiPrasad](https://togithub.com/AbhiPrasad) - Clarified the procedure for running tests ([#2276](https://togithub.com/getsentry/sentry-python/issues/2276)) by [@szokeasaurusrex](https://togithub.com/szokeasaurusrex) - Fix Chalice tests ([#2278](https://togithub.com/getsentry/sentry-python/issues/2278)) by [@sentrivana](https://togithub.com/sentrivana) - Bump Black from 23.3.0 to 23.7.0 ([#2256](https://togithub.com/getsentry/sentry-python/issues/2256)) by [@dependabot](https://togithub.com/dependabot) - Remove py3.4 from tox.ini ([#2248](https://togithub.com/getsentry/sentry-python/issues/2248)) by [@sentrivana](https://togithub.com/sentrivana) ### [`v1.28.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1281) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.28.0...1.28.1) ##### Various fixes & improvements - Redis: Add support for redis.asyncio ([#1933](https://togithub.com/getsentry/sentry-python/issues/1933)) by [@Zhenay](https://togithub.com/Zhenay) - Make sure each task that is started by Celery Beat has its own trace. ([#2249](https://togithub.com/getsentry/sentry-python/issues/2249)) by [@antonpirker](https://togithub.com/antonpirker) - Add Sampling Decision to Trace Envelope Header ([#2239](https://togithub.com/getsentry/sentry-python/issues/2239)) by [@antonpirker](https://togithub.com/antonpirker) - Do not add trace headers (`sentry-trace` and `baggage`) to HTTP requests to Sentry ([#2240](https://togithub.com/getsentry/sentry-python/issues/2240)) by [@antonpirker](https://togithub.com/antonpirker) - Prevent adding `sentry-trace` header multiple times ([#2235](https://togithub.com/getsentry/sentry-python/issues/2235)) by [@antonpirker](https://togithub.com/antonpirker) - Skip distributions with incomplete metadata ([#2231](https://togithub.com/getsentry/sentry-python/issues/2231)) by [@rominf](https://togithub.com/rominf) - Remove stale.yml ([#2245](https://togithub.com/getsentry/sentry-python/issues/2245)) by [@hubertdeng123](https://togithub.com/hubertdeng123) - Django: Fix 404 Handler handler being labeled as "generic ASGI request" ([#1277](https://togithub.com/getsentry/sentry-python/issues/1277)) by [@BeryJu](https://togithub.com/BeryJu) ### [`v1.28.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1280) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.27.1...1.28.0) ##### Various fixes & improvements - Add support for cron jobs in ARQ integration ([#2088](https://togithub.com/getsentry/sentry-python/issues/2088)) by [@lewazo](https://togithub.com/lewazo) - Backpressure handling prototype ([#2189](https://togithub.com/getsentry/sentry-python/issues/2189)) by [@sl0thentr0py](https://togithub.com/sl0thentr0py) - Add "replay" context to event payload ([#2234](https://togithub.com/getsentry/sentry-python/issues/2234)) by [@antonpirker](https://togithub.com/antonpirker) - Update test Django app to be compatible for Django 4.x ([#1794](https://togithub.com/getsentry/sentry-python/issues/1794)) by [@DilLip-Chowdary-Codes](https://togithub.com/DilLip-Chowdary-Codes) ### [`v1.27.1`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1271) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.27.0...1.27.1) ##### Various fixes & improvements - Add Starlette/FastAPI template tag for adding Sentry tracing information ([#2225](https://togithub.com/getsentry/sentry-python/issues/2225)) by [@antonpirker](https://togithub.com/antonpirker) - By adding `{{ sentry_trace_meta }}` to your Starlette/FastAPI Jinja2 templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend. - Fixed generation of baggage when a DSC is already in propagation context ([#2232](https://togithub.com/getsentry/sentry-python/issues/2232)) by [@antonpirker](https://togithub.com/antonpirker) - Handle explicitly passing `None` for `trace_configs` in `aiohttp` ([#2230](https://togithub.com/getsentry/sentry-python/issues/2230)) by [@Harmon758](https://togithub.com/Harmon758) - Support newest Starlette versions ([#2227](https://togithub.com/getsentry/sentry-python/issues/2227)) by [@antonpirker](https://togithub.com/antonpirker) ### [`v1.27.0`](https://togithub.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md#1270) [Compare Source](https://togithub.com/getsentry/sentry-python/compare/1.26.0...1.27.0) ##### Various fixes & improvements - Support for SQLAlchemy 2.0 ([#2200](https://togithub.com/getsentry/sentry-python/issues/2200)) by [@antonpirker](https://togithub.com/antonpirker) - Add instrumentation of `aiohttp` client requests ([#1761](https://togithub.com/getsentry/sentry-python/issues/1761)) by [@md384](https://togithub.com/md384) - Add Django template tag for adding Sentry tracing information ([#2222](https://togithub.com/getsentry/sentry-python/issues/2222)) by [@antonpirker](https://togithub.com/antonpirker) - By adding `{{ sentry_trace_meta }}` to your Django templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend. - Update Flask HTML meta helper ([#2203](https://togithub.com/getsentry/sentry-python/issues/2203)) by [@antonpirker](https://togithub.com/antonpirker) - Take trace ID always from propagation context ([#2209](https://togithub.com/getsentry/sentry-python/issues/2209)) by [@antonpirker](https://togithub.com/antonpirker) - Fix trace context in event payload ([#2205](https://togithub.com/getsentry/sentry-python/issues/2205)) by [@antonpirker](https://togithub.com/antonpirker) - Use new top levelConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.