Skip to content

Commit bb918fb

Browse files
docs: Remove last_event_id from migration guide
Since we reintroduced `last_event_id` in 2.2.0, we should remove it from the migration guide. Fixes GH-3118
1 parent 14f68ac commit bb918fb

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

MIGRATION_GUIDE.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,28 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh
2424
- `sentry_sdk.utils.is_sentry_url()` now takes a `Client` instead of a `Hub` as first parameter.
2525
- `sentry_sdk.utils._get_contextvars` does not return a tuple with three values, but a tuple with two values. The `copy_context` was removed.
2626
- You no longer have to use `configure_scope` to mutate a transaction. Instead, you simply get the current scope to mutate the transaction. Here is a recipe on how to change your code to make it work:
27-
Your existing implementation:
28-
```python
29-
transaction = sentry_sdk.transaction(...)
27+
Your existing implementation:
3028

31-
# later in the code execution:
29+
```python
30+
transaction = sentry_sdk.transaction(...)
31+
32+
# later in the code execution:
3233

33-
with sentry_sdk.configure_scope() as scope:
34-
scope.set_transaction_name("new-transaction-name")
35-
```
34+
with sentry_sdk.configure_scope() as scope:
35+
scope.set_transaction_name("new-transaction-name")
36+
```
3637

37-
needs to be changed to this:
38-
```python
39-
transaction = sentry_sdk.transaction(...)
38+
needs to be changed to this:
4039

41-
# later in the code execution:
40+
```python
41+
transaction = sentry_sdk.transaction(...)
42+
43+
# later in the code execution:
44+
45+
scope = sentry_sdk.Scope.get_current_scope()
46+
scope.set_transaction_name("new-transaction-name")
47+
```
4248

43-
scope = sentry_sdk.Scope.get_current_scope()
44-
scope.set_transaction_name("new-transaction-name")
45-
```
4649
- 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.
4750
<details>
4851
<summary><b>Show table</b></summary>
@@ -64,7 +67,6 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh
6467
- Removed support for Flask 0.\*.
6568
- Removed support for gRPC < 1.39.
6669
- Removed support for Tornado < 6.
67-
- 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.
6870
- 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.
6971
- 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.
7072
- 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.

0 commit comments

Comments
 (0)