|
2 | 2 |
|
3 | 3 | ## 2.68.0 |
4 | 4 |
|
| 5 | +### Important |
| 6 | + |
| 7 | +- We're making `enable_logs` and `enable_metrics` no-op with this release ([#7177](https://github.com/getsentry/sentry-python/pull/7177)), and they'll be dropped in the next major. |
| 8 | + |
| 9 | + Previously, `enable_logs` also controlled automatic logs collection from the logging and Loguru integrations. These integrations now get an integration-level `capture_sentry_logs` boolean option to allow for more control over the auto-collection. These options are `False` by default, i.e., **nothing is auto-collected without your explicit opt-in**. |
| 10 | + |
| 11 | + #### Action Needed |
| 12 | + |
| 13 | + If you had `enable_logs` set to `True`: |
| 14 | + - If you were using the `sentry_sdk.logger.X` API, no action necessary, the API will just work. |
| 15 | + - If you were auto-collecting logs from either `LoggingIntegration` or `LoguruIntegration`, the auto-collection **will be turned off in this release**. You can switch auto-collection on explicitly with: |
| 16 | + |
| 17 | + ```python |
| 18 | + import sentry_sdk |
| 19 | + from sentry_sdk.integrations.logging import LoggingIntegration |
| 20 | + from sentry_sdk.integrations.loguru import LoguruIntegration |
| 21 | + |
| 22 | + sentry_sdk.init( |
| 23 | + integrations=[ |
| 24 | + LoggingIntegration(capture_sentry_logs=True), |
| 25 | + LoguruIntegration(capture_sentry_logs=True), |
| 26 | + ], |
| 27 | + ) |
| 28 | + ``` |
| 29 | + |
| 30 | + If you had `enable_logs` set to `False`: |
| 31 | + - If you were using it to gate usages of the `sentry_sdk.logger.X` API, you'll need to remove the calls entirely or define a `before_send_log` callback to filter out unwanted logs. |
| 32 | + |
| 33 | + If you has `enable_metrics` set to `False`: |
| 34 | + - Any metrics emitted using the metrics API will be emitted. You'll need to drop them in a `before_send_metric` or remove the calls to the API. |
| 35 | + |
| 36 | + ### Why We're Doing This |
| 37 | + |
| 38 | + We recognize this is a disruptive change for some folks and want to make it clear this is a one-off. We're removing the options because they were an unnecessary hurdle that one had to jump through to be able to use logs and metrics, and it was confusing why the logging API would not just work on its own. On the other hand, we wanted to give you more fine-grained control over automatic collection. |
| 39 | + |
| 40 | + |
5 | 41 | ### New Features ✨ |
6 | 42 |
|
7 | 43 | #### Other |
|
16 | 52 |
|
17 | 53 | ### Internal Changes 🔧 |
18 | 54 |
|
19 | | -#### Httpx,Httpx2 |
| 55 | +#### HTTPX, HTTPX2 |
20 | 56 |
|
21 | 57 | - Move crumbs to integrations by @sentrivana in [#7149](https://github.com/getsentry/sentry-python/pull/7149) |
22 | 58 | - Split into sync/async tests by @sentrivana in [#7152](https://github.com/getsentry/sentry-python/pull/7152) |
|
29 | 65 | - (pyreqwest) Move crumbs to integration by @sentrivana in [#7148](https://github.com/getsentry/sentry-python/pull/7148) |
30 | 66 | - (stdlib) Move crumbs to integration by @sentrivana in [#7161](https://github.com/getsentry/sentry-python/pull/7161) |
31 | 67 | - Flush trace buckets when segment spans finish by @alexander-alderman-webb in [#7170](https://github.com/getsentry/sentry-python/pull/7170) |
32 | | -- Make `enable_logs`, `enable_metrics` no-op by @sentrivana in [#7177](https://github.com/getsentry/sentry-python/pull/7177) |
33 | 68 | - Revert global span batcher limits by @alexander-alderman-webb in [#7168](https://github.com/getsentry/sentry-python/pull/7168) |
34 | 69 |
|
35 | 70 | ## 2.67.0 |
|
0 commit comments