Skip to content

Commit 21c4619

Browse files
author
getsentry-bot
committed
Merge branch 'release/2.0.0a2' into sentry-sdk-2.0
2 parents 1e1daf1 + fdebd53 commit 21c4619

File tree

5 files changed

+88
-5
lines changed

5 files changed

+88
-5
lines changed

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,88 @@
11
# Changelog
22

3+
## 2.0.0a2
4+
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:
36+
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`.
85+
386
## 1.40.6
487

588
### Various fixes & improvements

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This is the official Python SDK for [Sentry](http://sentry.io/)
1616

1717
---
1818

19-
## Note about SDK 2.0a1
19+
## Note about SDK 2.0.0a2
2020

21-
**Sentry SDK 2.0a1** is alpha software and not yet ready for production.
21+
**Sentry SDK 2.0.0a2** is alpha software and not yet ready for production.
2222

2323
Please give it a spin and test it with your project. If you have any questions or feedback please contact us on [Discord](https://discord.gg/Ww9hbqr) in the [#python](https://discord.com/channels/621778831602221064/621783758739079168) channel or create a [GitHub Issue](https://github.com/getsentry/sentry-python/issues) or start a [GitHub Discussion](https://github.com/getsentry/sentry-python/discussions).
2424

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
copyright = "2019-{}, Sentry Team and Contributors".format(datetime.now().year)
2929
author = "Sentry Team and Contributors"
3030

31-
release = "1.40.6"
31+
release = "2.0.0a2"
3232
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3333

3434

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,4 @@ def _get_default_options():
326326
del _get_default_options
327327

328328

329-
VERSION = "1.40.6"
329+
VERSION = "2.0.0a2"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_file_text(file_name):
2121

2222
setup(
2323
name="sentry-sdk",
24-
version="1.40.6",
24+
version="2.0.0a2",
2525
author="Sentry Team and Contributors",
2626
author_email="[email protected]",
2727
url="https://github.com/getsentry/sentry-python",

0 commit comments

Comments
 (0)