|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 2.68.0 |
| 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 | + |
| 41 | +### New Features ✨ |
| 42 | + |
| 43 | +#### Other |
| 44 | + |
| 45 | +- Set the segment source on the scope for `NoOpStreamedSpan` by @alexander-alderman-webb in [#7163](https://github.com/getsentry/sentry-python/pull/7163) |
| 46 | +- Remove early return for `NoOpStreamedSpan` in `set_transaction_name()` by @alexander-alderman-webb in [#7164](https://github.com/getsentry/sentry-python/pull/7164) |
| 47 | +- Set the segment name on the scope with `NoOpStreamedSpan` by @alexander-alderman-webb in [#7162](https://github.com/getsentry/sentry-python/pull/7162) |
| 48 | + |
| 49 | +### Bug Fixes 🐛 |
| 50 | + |
| 51 | +- (batcher) Add global flush trigger based on the span number by @alexander-alderman-webb in [#7150](https://github.com/getsentry/sentry-python/pull/7150) |
| 52 | + |
| 53 | +### Internal Changes 🔧 |
| 54 | + |
| 55 | +#### HTTPX, HTTPX2 |
| 56 | + |
| 57 | +- Move crumbs to integrations by @sentrivana in [#7149](https://github.com/getsentry/sentry-python/pull/7149) |
| 58 | +- Split into sync/async tests by @sentrivana in [#7152](https://github.com/getsentry/sentry-python/pull/7152) |
| 59 | + |
| 60 | +#### Other |
| 61 | + |
| 62 | +- (aiohttp) Move crumbs to integration by @sentrivana in [#7135](https://github.com/getsentry/sentry-python/pull/7135) |
| 63 | +- (boto3) Move crumbs to integration by @sentrivana in [#7165](https://github.com/getsentry/sentry-python/pull/7165) |
| 64 | +- (django) Remove dead code and stale markers from the Django test suite by @ericapisani in [#7156](https://github.com/getsentry/sentry-python/pull/7156) |
| 65 | +- (pyreqwest) Move crumbs to integration by @sentrivana in [#7148](https://github.com/getsentry/sentry-python/pull/7148) |
| 66 | +- (stdlib) Move crumbs to integration by @sentrivana in [#7161](https://github.com/getsentry/sentry-python/pull/7161) |
| 67 | +- Flush trace buckets when segment spans finish by @alexander-alderman-webb in [#7170](https://github.com/getsentry/sentry-python/pull/7170) |
| 68 | +- Revert global span batcher limits by @alexander-alderman-webb in [#7168](https://github.com/getsentry/sentry-python/pull/7168) |
| 69 | + |
3 | 70 | ## 2.67.0 |
4 | 71 |
|
5 | 72 | ### New Features ✨ |
|
0 commit comments