Skip to content

Commit 888ee4c

Browse files
authored
docs: Update readme, migration guide (#2754)
1 parent 8aa9599 commit 888ee4c

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

MIGRATION_GUIDE.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,34 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh
88

99
## Changed
1010

11+
- Setting the parameter `propagate_hub` to `True` in `ThreadingIntegration(propagate_hub=True)` only works on Python 3.7+.
12+
- The Pyramid integration will not capture errors that might happen in `authenticated_userid()` in a custom `AuthenticationPolicy` class.
13+
- The method `need_code_loation` of the `MetricsAggregator` was renamed to `need_code_location`.
1114
- The `BackgroundWorker` thread used to process events was renamed from `raven-sentry.BackgroundWorker` to `sentry-sdk.BackgroundWorker`.
1215
- The `reraise` function was moved from `sentry_sdk._compat` to `sentry_sdk.utils`.
1316
- Moved the contents of `tracing_utils_py3.py` to `tracing_utils.py`. The `start_child_span_decorator` is now in `sentry_sdk.tracing_utils`.
1417
- 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.
15-
- The Pyramid integration will not capture errors that might happen in `authenticated_userid()` in a custom `AuthenticationPolicy` class.
16-
- Setting the parameter `propagate_hub` to `True` in `ThreadingIntegration(propagate_hub=True)` only works on Python 3.7+.
17-
- The method `need_code_loation` of the `MetricsAggregator` was renamed to `need_code_location`.
1818

1919
## Removed
2020

2121
- Removed support for Python 2 and Python 3.5. The SDK now requires at least Python 3.6.
2222
- Removed support for Celery 3.\*.
2323
- Removed support for Django 1.8, 1.9, 1.10.
2424
- Removed support for Flask 0.\*.
25-
- 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.
26-
- `sentry_sdk._functools` was removed.
27-
- A number of compatibility utilities were removed from `sentry_sdk._compat`: the constants `PY2` and `PY33`; the functions `datetime_utcnow`, `utc_from_timestamp`, `implements_str`, `contextmanager`; and the aliases `text_type`, `string_types`, `number_types`, `int_types`, `iteritems`, `binary_sequence_types`.
25+
- 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.
26+
- 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.
2827
- 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.
2928
- 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.
30-
- Removed `sentry_sdk.utils.Auth.store_api_url`.
31-
- `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.
32-
- Removed `tracing_utils_py2.py`. The `start_child_span_decorator` is now in `sentry_sdk.tracing_utils`.
29+
- Removed support for `user.segment`. It was also removed from the trace header as well as from the dynamic sampling context.
3330
- Removed support for the `install` method for custom integrations. Please use `setup_once` instead.
3431
- Removed `sentry_sdk.tracing.Span.new_span`. Use `sentry_sdk.tracing.Span.start_child` instead.
3532
- Removed `sentry_sdk.tracing.Transaction.new_span`. Use `sentry_sdk.tracing.Transaction.start_child` instead.
36-
- Removed support for `user.segment`. It was also removed from the trace header as well as from the dynamic sampling context.
33+
- Removed `sentry_sdk.utils.Auth.store_api_url`.
34+
- `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.
35+
- Removed `tracing_utils_py2.py`. The `start_child_span_decorator` is now in `sentry_sdk.tracing_utils`.
3736

3837
## Deprecated
3938

40-
- Deprecated `sentry_sdk.transport.Transport.capture_event`. Please use `sentry_sdk.transport.Transport.capture_envelope`, instead.
41-
- 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.
4239
- `profiler_mode` and `profiles_sample_rate` have been deprecated as `_experiments` options. Use them as top level options instead:
4340
```python
4441
sentry_sdk.init(
@@ -47,3 +44,5 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh
4744
profiles_sample_rate=1.0,
4845
)
4946
```
47+
- Deprecated `sentry_sdk.transport.Transport.capture_event`. Please use `sentry_sdk.transport.Transport.capture_envelope`, instead.
48+
- 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.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ See [the documentation](https://docs.sentry.io/platforms/python/integrations/) f
7676
- [Google Cloud Functions](https://docs.sentry.io/platforms/python/integrations/gcp-functions/)
7777

7878

79-
## Migrating From `raven-python`
79+
## Migrating
80+
81+
### Migrating From `1.x` to `2.x`
82+
83+
If you're on SDK version 1.x, we highly recommend updating to the 2.x major. To make the process easier we've prepared a [migration guide](https://docs.sentry.io/platforms/python/migration/) with the most common changes as well as a [detailed changelog](MIGRATION_GUIDE.md).
84+
85+
### Migrating From `raven-python`
8086

8187
The old `raven-python` client has entered maintenance mode and was moved [here](https://github.com/getsentry/raven-python).
8288

0 commit comments

Comments
 (0)