Skip to content

Commit fdebd53

Browse files
authored
Update CHANGELOG.md
1 parent 3b79ba3 commit fdebd53

File tree

1 file changed

+79
-27
lines changed

1 file changed

+79
-27
lines changed

CHANGELOG.md

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

33
## 2.0.0a2
44

5-
### Various fixes & improvements
5+
## New Features
6+
7+
- Additional integrations will now be activated automatically if the SDK detects the respective package is installed: Ariadne, ARQ, asyncpg, Chalice, clickhouse-driver, GQL, Graphene, huey, Loguru, PyMongo, Quart, Starlite, Strawberry.
8+
9+
## Changed
10+
11+
- The Pyramid integration will not capture errors that might happen in `authenticated_userid()` in a custom `AuthenticationPolicy` class.
12+
- The method `need_code_loation` of the `MetricsAggregator` was renamed to `need_code_location`.
13+
- The `BackgroundWorker` thread used to process events was renamed from `raven-sentry.BackgroundWorker` to `sentry-sdk.BackgroundWorker`.
14+
- The `reraise` function was moved from `sentry_sdk._compat` to `sentry_sdk.utils`.
15+
- The `_ScopeManager` was moved from `sentry_sdk.hub` to `sentry_sdk.scope`.
16+
- Moved the contents of `tracing_utils_py3.py` to `tracing_utils.py`. The `start_child_span_decorator` is now in `sentry_sdk.tracing_utils`.
17+
- The actual implementation of `get_current_span` was moved to `sentry_sdk.tracing_utils`. `sentry_sdk.get_current_span` is still accessible as part of the top-level API.
18+
- `sentry_sdk.tracing_utils.get_current_span()` does now take a `scope` instead of a `hub` as parameter.
19+
- `sentry_sdk.utils._get_contextvars` does not return a tuple with three values, but a tuple with two values. The `copy_context` was removed.
20+
- If you create a transaction manually and later mutate the transaction in a `configure_scope` block this does not work anymore. Here is a recipe on how to change your code to make it work:
21+
Your existing implementation:
22+
```python
23+
transaction = sentry_sdk.transaction(...)
24+
25+
# later in the code execution:
26+
27+
with sentry_sdk.configure_scope() as scope:
28+
scope.set_transaction_name("new-transaction-name")
29+
```
30+
31+
needs to be changed to this:
32+
```python
33+
transaction = sentry_sdk.transaction(...)
34+
35+
# later in the code execution:
636

7-
- Fork test_tracedecorator_async (#2778) by @sentrivana
8-
- More compatibility tests (#2772) by @antonpirker
9-
- Allow to configure merge target for releases (#2777) by @sentrivana
10-
- fix(docs): allow empty character in metric tags values (#2775) by @viglia
11-
- fix(metrics): Replace invalid tag values with an empty string instead of _ (#2773) by @markushi
12-
- docs: Add documentation comment to `scrub_list` (#2769) by @szokeasaurusrex
13-
- ref(scrubber): Add recursive scrubbing to EventScrubber (#2755) by @Cheapshot003
14-
- Fixed regex to parse version in lambda package file (#2767) by @sentrivana
15-
- Temporarily disable tests for alpha release (fa5f50b0) by @antonpirker
16-
- channel link (0594cfa5) by @antonpirker
17-
- Added note to README (cdf4f901) by @antonpirker
18-
- Updated migration guide (ad4ff19c) by @antonpirker
19-
- ref(api): Abstract base classes (#2667) by @szokeasaurusrex
20-
- Scope refactoring (merge Hubs and Scopes) (#2610) by @antonpirker
21-
- docs: Update readme, migration guide (#2754) by @sentrivana
22-
- Remove PY2 (8aa95995) by @sentrivana
23-
- Added last_event_id() to the stuff that has been removed. (93f89e00) by @antonpirker
24-
- ref: Use new-style super() (#2744) by @sentrivana
25-
- ref(docs): Tweak migration guide (#2742) by @sentrivana
26-
- fix(metrics): Fix typo (#2735) by @sentrivana
27-
- Deprecate profiler `_experiments` options (#2737) by @sentrivana
28-
- Remove `user.segment` (#2726) by @sentrivana
29-
- ref(transport): Remove compatibility import (#2698) by @sentrivana
30-
- Typo (#2690) by @sentrivana
31-
32-
_Plus 22 more_
37+
scope = sentry_sdk.Scope.get_current_scope()
38+
scope.set_transaction_name("new-transaction-name")
39+
```
40+
- The classes listed in the table below are now abstract base classes. Therefore, they can no longer be instantiated. Subclasses can only be instantiated if they implement all of the abstract methods.
41+
<details>
42+
<summary><b>Show table</b></summary>
43+
44+
| Class | Abstract methods |
45+
| ------------------------------------- | -------------------------------------- |
46+
| `sentry_sdk.integrations.Integration` | `setup_once` |
47+
| `sentry_sdk.metrics.Metric` | `add`, `serialize_value`, and `weight` |
48+
| `sentry_sdk.profiler.Scheduler` | `setup` and `teardown` |
49+
| `sentry_sdk.transport.Transport` | `capture_envelope` |
50+
51+
</details>
52+
53+
## Removed
54+
55+
- Removed support for Python 2 and Python 3.5. The SDK now requires at least Python 3.6.
56+
- Removed support for Celery 3.\*.
57+
- Removed support for Django 1.8, 1.9, 1.10.
58+
- Removed support for Flask 0.\*.
59+
- Removed `last_event_id()` top level API. The last event ID is still returned by `capture_event()`, `capture_exception()` and `capture_message()` but the top level API `sentry_sdk.last_event_id()` has been removed.
60+
- Removed support for sending events to the `/store` endpoint. Everything is now sent to the `/envelope` endpoint. If you're on SaaS you don't have to worry about this, but if you're running Sentry yourself you'll need version `20.6.0` or higher of self-hosted Sentry.
61+
- The deprecated `with_locals` configuration option was removed. Use `include_local_variables` instead. See https://docs.sentry.io/platforms/python/configuration/options/#include-local-variables.
62+
- The deprecated `request_bodies` configuration option was removed. Use `max_request_body_size`. See https://docs.sentry.io/platforms/python/configuration/options/#max-request-body-size.
63+
- Removed support for `user.segment`. It was also removed from the trace header as well as from the dynamic sampling context.
64+
- Removed support for the `install` method for custom integrations. Please use `setup_once` instead.
65+
- Removed `sentry_sdk.tracing.Span.new_span`. Use `sentry_sdk.tracing.Span.start_child` instead.
66+
- Removed `sentry_sdk.tracing.Transaction.new_span`. Use `sentry_sdk.tracing.Transaction.start_child` instead.
67+
- Removed `sentry_sdk.utils.Auth.store_api_url`.
68+
- `sentry_sdk.utils.Auth.get_api_url`'s now accepts a `sentry_sdk.consts.EndpointType` enum instead of a string as its only parameter. We recommend omitting this argument when calling the function, since the parameter's default value is the only possible `sentry_sdk.consts.EndpointType` value. The parameter exists for future compatibility.
69+
- Removed `tracing_utils_py2.py`. The `start_child_span_decorator` is now in `sentry_sdk.tracing_utils`.
70+
- Removed the `sentry_sdk.profiler.Scheduler.stop_profiling` method. Any calls to this method can simply be removed, since this was a no-op method.
71+
72+
## Deprecated
73+
74+
- `profiler_mode` and `profiles_sample_rate` have been deprecated as `_experiments` options. Use them as top level options instead:
75+
```python
76+
sentry_sdk.init(
77+
...,
78+
profiler_mode="thread",
79+
profiles_sample_rate=1.0,
80+
)
81+
```
82+
- Deprecated `sentry_sdk.transport.Transport.capture_event`. Please use `sentry_sdk.transport.Transport.capture_envelope`, instead.
83+
- Passing a function to `sentry_sdk.init`'s `transport` keyword argument has been deprecated. If you wish to provide a custom transport, please pass a `sentry_sdk.transport.Transport` instance or a subclass.
84+
- The parameter `propagate_hub` in `ThreadingIntegration()` was deprecated and renamed to `propagate_scope`.
3385

3486
## 1.40.6
3587

0 commit comments

Comments
 (0)