diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 7936fa52bf..9a24e8d11d 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -22,6 +22,7 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh - Removed support for Celery 3.\*. - Removed support for Django 1.8, 1.9, 1.10. - Removed support for Flask 0.\*. +- 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. - `sentry_sdk._functools` was removed. - 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`. - 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. diff --git a/sentry_sdk/hub.py b/sentry_sdk/hub.py index b9e38f3d09..0853d3161a 100644 --- a/sentry_sdk/hub.py +++ b/sentry_sdk/hub.py @@ -285,11 +285,14 @@ def scope(self): def last_event_id(self): # type: () -> Optional[str] """ - .. deprecated:: 2.0.0 - This function is deprecated and will be removed in a future release. - Returns the last event ID. + + .. deprecated:: 1.40.5 + This function is deprecated and will be removed in a future release. The functions `capture_event`, `capture_message`, and `capture_exception` return the event ID directly. """ + logger.warning( + "Deprecated: last_event_id is deprecated. This will be removed in the future. The functions `capture_event`, `capture_message`, and `capture_exception` return the event ID directly." + ) return self._last_event_id def bind_client(