|
2 | 2 |
|
3 | 3 | ## 2.16.0
|
4 | 4 |
|
5 |
| -### Various fixes & improvements |
| 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 |
6 | 53 |
|
7 |
| -- Remove flaky test (#3626) by @sentrivana |
8 | 54 | - Add 3.13 to setup.py (#3574) by @sentrivana
|
9 | 55 | - Add 3.13 to basepython (#3589) by @sentrivana
|
10 |
| -- feat(bottle): Add `failed_request_status_codes` (#3618) by @szokeasaurusrex |
11 |
| -- feat: Add opportunistic Brotli compression (#3612) by @BYK |
12 |
| -- fix(django): improve getting psycopg3 connection info (#3580) by @nijel |
13 |
| -- feat: Add `__notes__` support (#3620) by @szokeasaurusrex |
14 |
| -- fix: Open relevant error when SpotlightMiddleware is on (#3614) by @BYK |
15 |
| -- build(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0 (#3617) by @dependabot |
16 |
| -- feat(django): Add SpotlightMiddleware when Spotlight is enabled (#3600) by @BYK |
17 |
| -- feat: Add httpcore based HTTP2Transport (#3588) by @BYK |
18 |
| -- Add http_methods_to_capture to ASGI Django (#3607) by @sentrivana |
19 |
| -- ref(bottle): Delete never-reached code (#3605) by @szokeasaurusrex |
| 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 |
20 | 60 | - Remove useless makefile targets (#3604) by @antonpirker
|
21 | 61 | - Simplify tox version spec (#3609) by @sentrivana
|
22 | 62 | - Consolidate contributing docs (#3606) by @antonpirker
|
23 |
| -- Fix type of sample_rate in DSC (and add explanatory tests) (#3603) by @antonpirker |
| 63 | +- Bump codecov/codecov-action from 4.5.0 to 4.6.0 (#3617) by @dependabot |
24 | 64 |
|
25 | 65 | ## 2.15.0
|
26 | 66 |
|
|
40 | 80 | ),
|
41 | 81 | ],
|
42 | 82 | )
|
| 83 | + ``` |
43 | 84 |
|
44 | 85 | - Django: Allow ASGI to use `drf_request` in `DjangoRequestExtractor` (#3572) by @PakawiNz
|
45 | 86 | - Django: Don't let `RawPostDataException` bubble up (#3553) by @sentrivana
|
|
0 commit comments