Skip to content

Commit 1653c11

Browse files
author
getsentry-bot
committed
Merge branch 'release/2.16.0'
2 parents 01b4687 + 9098601 commit 1653c11

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
11
# Changelog
22

3+
## 2.16.0
4+
5+
### Integrations
6+
7+
- Bottle: Add `failed_request_status_codes` (#3618) by @szokeasaurusrex
8+
9+
You can now define a set of integers that will determine which status codes
10+
should be reported to Sentry.
11+
12+
```python
13+
sentry_sdk.init(
14+
integrations=[
15+
BottleIntegration(
16+
failed_request_status_codes={403, *range(500, 600)},
17+
)
18+
]
19+
)
20+
```
21+
22+
Examples of valid `failed_request_status_codes`:
23+
24+
- `{500}` will only send events on HTTP 500.
25+
- `{400, *range(500, 600)}` will send events on HTTP 400 as well as the 5xx range.
26+
- `{500, 503}` will send events on HTTP 500 and 503.
27+
- `set()` (the empty set) will not send events for any HTTP status code.
28+
29+
The default is `{*range(500, 600)}`, meaning that all 5xx status codes are reported to Sentry.
30+
31+
- Bottle: Delete never-reached code (#3605) by @szokeasaurusrex
32+
- Redis: Remove flaky test (#3626) by @sentrivana
33+
- Django: Improve getting `psycopg3` connection info (#3580) by @nijel
34+
- Django: Add `SpotlightMiddleware` when Spotlight is enabled (#3600) by @BYK
35+
- Django: Open relevant error when `SpotlightMiddleware` is on (#3614) by @BYK
36+
- Django: Support `http_methods_to_capture` in ASGI Django (#3607) by @sentrivana
37+
38+
ASGI Django now also supports the `http_methods_to_capture` integration option. This is a configurable tuple of HTTP method verbs that should create a transaction in Sentry. The default is `("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",)`. `OPTIONS` and `HEAD` are not included by default.
39+
40+
Here's how to use it:
41+
42+
```python
43+
sentry_sdk.init(
44+
integrations=[
45+
DjangoIntegration(
46+
http_methods_to_capture=("GET", "POST"),
47+
),
48+
],
49+
)
50+
```
51+
52+
### Miscellaneous
53+
54+
- Add 3.13 to setup.py (#3574) by @sentrivana
55+
- Add 3.13 to basepython (#3589) by @sentrivana
56+
- Fix type of `sample_rate` in DSC (and add explanatory tests) (#3603) by @antonpirker
57+
- Add `httpcore` based `HTTP2Transport` (#3588) by @BYK
58+
- Add opportunistic Brotli compression (#3612) by @BYK
59+
- Add `__notes__` support (#3620) by @szokeasaurusrex
60+
- Remove useless makefile targets (#3604) by @antonpirker
61+
- Simplify tox version spec (#3609) by @sentrivana
62+
- Consolidate contributing docs (#3606) by @antonpirker
63+
- Bump `codecov/codecov-action` from `4.5.0` to `4.6.0` (#3617) by @dependabot
64+
365
## 2.15.0
466

567
### Integrations
@@ -18,6 +80,7 @@
1880
),
1981
],
2082
)
83+
```
2184

2285
- Django: Allow ASGI to use `drf_request` in `DjangoRequestExtractor` (#3572) by @PakawiNz
2386
- Django: Don't let `RawPostDataException` bubble up (#3553) by @sentrivana

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
copyright = "2019-{}, Sentry Team and Contributors".format(datetime.now().year)
2929
author = "Sentry Team and Contributors"
3030

31-
release = "2.15.0"
31+
release = "2.16.0"
3232
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3333

3434

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,4 +574,4 @@ def _get_default_options():
574574
del _get_default_options
575575

576576

577-
VERSION = "2.15.0"
577+
VERSION = "2.16.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_file_text(file_name):
2121

2222
setup(
2323
name="sentry-sdk",
24-
version="2.15.0",
24+
version="2.16.0",
2525
author="Sentry Team and Contributors",
2626
author_email="[email protected]",
2727
url="https://github.com/getsentry/sentry-python",

0 commit comments

Comments
 (0)