Skip to content

Commit 5de346c

Browse files
committed
Refactor changelog
1 parent 7bee75f commit 5de346c

File tree

1 file changed

+91
-27
lines changed

1 file changed

+91
-27
lines changed

CHANGELOG.md

Lines changed: 91 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,98 @@
22

33
## 2.15.0
44

5-
### Various fixes & improvements
5+
### Integrations
6+
7+
- Configure HTTP methods to capture in ASGI/WSGI middleware and frameworks (#3531) by @antonpirker
8+
9+
We've added a new option to the Django, Flask, Starlette and FastAPI integrations called `http_methods_to_capture`. 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.
10+
11+
Here's how to use it (substitute Flask for your framework integration):
12+
13+
```python
14+
sentry_sdk.init(
15+
integrations=[
16+
FlaskIntegration(
17+
http_methods_to_capture=("GET", "POST"),
18+
),
19+
],
20+
)
21+
22+
- Django: Allow ASGI to use `drf_request` in `DjangoRequestExtractor` (#3572) by @PakawiNz
23+
- Django: Don't let `RawPostDataException` bubble up (#3553) by @sentrivana
24+
- Django: Add `sync_capable` to `SentryWrappingMiddleware` (#3510) by @szokeasaurusrex
25+
- AIOHTTP: Add `failed_request_status_codes` (#3551) by @szokeasaurusrex
26+
27+
You can now define a set of integers that will determine which status codes
28+
should be reported to Sentry.
29+
30+
```python
31+
sentry_sdk.init(
32+
integrations=[
33+
StarletteIntegration(
34+
failed_request_status_codes={403, *range(500, 599)},
35+
)
36+
]
37+
)
38+
```
639

7-
- Configure HTTP methods to capture in WSGI middleware and frameworks (#3531) by @antonpirker
8-
- XFail one of the Lambda tests (#3592) by @antonpirker
9-
- allowing ASGI to use drf_request in DjangoRequestExtractor (#3572) by @PakawiNz
10-
- fix(tracing): Fix `add_query_source` with modules outside of project root (#3313) by @rominf
11-
- build(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#3585) by @dependabot
40+
Examples of valid `failed_request_status_codes`:
41+
42+
- `{500}` will only send events on HTTP 500.
43+
- `{400, *range(500, 600)}` will send events on HTTP 400 as well as the 5xx range.
44+
- `{500, 503}` will send events on HTTP 500 and 503.
45+
- `set()` (the empty set) will not send events for any HTTP status code.
46+
47+
The default is `{*range(500, 600)}`, meaning that all 5xx status codes are reported to Sentry.
48+
49+
- AIOHTTP: Delete test which depends on AIOHTTP behavior (#3568) by @szokeasaurusrex
50+
- AIOHTTP: Handle invalid responses (#3554) by @szokeasaurusrex
51+
- FastAPI/Starlette: Support new `failed_request_status_codes` (#3563) by @szokeasaurusrex
52+
53+
The format of `failed_request_status_codes` has changed slightly from a list
54+
of containers to a set:
55+
56+
```python
57+
sentry_sdk.init(
58+
integrations=StarletteIntegration(
59+
failed_request_status_codes={403, *range(500, 599)},
60+
),
61+
)
62+
```
63+
64+
The old way of defining `failed_request_status_codes` will continue to work
65+
for the time being. Examples of valid new-style `failed_request_status_codes`:
66+
67+
- `{500}` will only send events on HTTP 500.
68+
- `{400, *range(500, 600)}` will send events on HTTP 400 as well as the 5xx range.
69+
- `{500, 503}` will send events on HTTP 500 and 503.
70+
- `set()` (the empty set) will not send events for any HTTP status code.
71+
72+
The default is `{*range(500, 600)}`, meaning that all 5xx status codes are reported to Sentry.
73+
74+
- FastAPI/Starlette: Fix `failed_request_status_codes=[]` (#3561) by @szokeasaurusrex
75+
- FastAPI/Starlette: Remove invalid `failed_request_status_code` tests (#3560) by @szokeasaurusrex
76+
- FastAPI/Starlette: Refactor shared test parametrization (#3562) by @szokeasaurusrex
77+
78+
### Miscellaneous
79+
80+
- Deprecate `sentry_sdk.metrics` (#3512) by @szokeasaurusrex
81+
- Add `name` parameter to `start_span()` and deprecate `description` parameter (#3524 & #3525) by @antonpirker
82+
- Fix `add_query_source` with modules outside of project root (#3313) by @rominf
1283
- Test more integrations on 3.13 (#3578) by @sentrivana
1384
- Fix trailing whitespace (#3579) by @sentrivana
14-
- test(aiohttp): Delete test which depends on AIOHTTP behavior (#3568) by @szokeasaurusrex
15-
- feat(starlette): Support new `failed_request_status_codes` (#3563) by @szokeasaurusrex
16-
- ref(aiohttp): Make `DEFUALT_FAILED_REQUEST_STATUS_CODES` private (#3558) by @szokeasaurusrex
17-
- fix(starlette): Fix `failed_request_status_codes=[]` (#3561) by @szokeasaurusrex
18-
- test(starlette): Remove invalid `failed_request_status_code` tests (#3560) by @szokeasaurusrex
19-
- test(starlette): Refactor shared test parametrization (#3562) by @szokeasaurusrex
20-
- feat(aiohttp): Add `failed_request_status_codes` (#3551) by @szokeasaurusrex
21-
- ref(client): Improve `get_integration` typing (#3550) by @szokeasaurusrex
22-
- test: Make import-related tests stable (#3548) by @BYK
23-
- fix: Fix breadcrumb timestamp casting and its tests (#3546) by @BYK
24-
- fix(aiohttp): Handle invalid responses (#3554) by @szokeasaurusrex
25-
- fix(django): Don't let RawPostDataException bubble up (#3553) by @sentrivana
26-
- fix: Don't use deprecated logger.warn (#3552) by @sentrivana
27-
- ci: update actions/upload-artifact to v4 with merge (#3545) by @joshuarli
28-
- tests: Fix cohere API change (#3549) by @BYK
29-
- fixed message (#3536) by @antonpirker
30-
- Removed experimental explain_plan feature. (#3534) by @antonpirker
31-
32-
_Plus 6 more_
85+
- Improve `get_integration` typing (#3550) by @szokeasaurusrex
86+
- Make import-related tests stable (#3548) by @BYK
87+
- Fix breadcrumb sorting (#3511) by @sentrivana
88+
- Fix breadcrumb timestamp casting and its tests (#3546) by @BYK
89+
- Don't use deprecated `logger.warn` (#3552) by @sentrivana
90+
- Fix Cohere API change (#3549) by @BYK
91+
- Fix deprecation message (#3536) by @antonpirker
92+
- Remove experimental `explain_plan` feature. (#3534) by @antonpirker
93+
- X-fail one of the Lambda tests (#3592) by @antonpirker
94+
- Update Codecov config (#3507) by @antonpirker
95+
- Update `actions/upload-artifact` to `v4` with merge (#3545) by @joshuarli
96+
- Bump `actions/checkout` from `4.1.7` to `4.2.0` (#3585) by @dependabot
3397

3498
## 2.14.0
3599

@@ -78,7 +142,7 @@ _Plus 6 more_
78142
init_sentry()
79143

80144
ray.init(
81-
runtime_env=dict(worker_process_setup_hook=init_sentry),
145+
runtime_env=dict(worker_process_setup_hook=init_sentry),
82146
)
83147
```
84148
For more information, see the documentation for the [Ray integration](https://docs.sentry.io/platforms/python/integrations/ray/).
@@ -130,7 +194,7 @@ _Plus 6 more_
130194
For more information, see the documentation for the [Dramatiq integration](https://docs.sentry.io/platforms/python/integrations/dramatiq/).
131195

132196
- **New config option:** Expose `custom_repr` function that precedes `safe_repr` invocation in serializer (#3438) by @sl0thentr0py
133-
197+
134198
See: https://docs.sentry.io/platforms/python/configuration/options/#custom-repr
135199

136200
- Profiling: Add client SDK info to profile chunk (#3386) by @Zylphrex

0 commit comments

Comments
 (0)