Skip to content

Commit c819e66

Browse files
authored
Update README
1 parent 90446df commit c819e66

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
## 2.68.0
44

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+
541
### New Features ✨
642

743
#### Other
@@ -16,7 +52,7 @@
1652

1753
### Internal Changes 🔧
1854

19-
#### Httpx,Httpx2
55+
#### HTTPX, HTTPX2
2056

2157
- Move crumbs to integrations by @sentrivana in [#7149](https://github.com/getsentry/sentry-python/pull/7149)
2258
- Split into sync/async tests by @sentrivana in [#7152](https://github.com/getsentry/sentry-python/pull/7152)
@@ -29,7 +65,6 @@
2965
- (pyreqwest) Move crumbs to integration by @sentrivana in [#7148](https://github.com/getsentry/sentry-python/pull/7148)
3066
- (stdlib) Move crumbs to integration by @sentrivana in [#7161](https://github.com/getsentry/sentry-python/pull/7161)
3167
- 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)
3368
- Revert global span batcher limits by @alexander-alderman-webb in [#7168](https://github.com/getsentry/sentry-python/pull/7168)
3469

3570
## 2.67.0

0 commit comments

Comments
 (0)