Skip to content

Commit 3c5f761

Browse files
authored
Remove Hub and related code for good. (#3446)
* Removed hub based functions from sessions implementation * Removed scope manager * Removed hub from tracing * Removed hub from apidocs * Updated migration guide * Updated migration guide
1 parent 57166a4 commit 3c5f761

File tree

19 files changed

+21
-1401
lines changed

19 files changed

+21
-1401
lines changed

MIGRATION_GUIDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,20 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
99

1010
### Changed
1111

12+
- The `Span()` constructor does not accept a `hub` parameter anymore.
13+
- `Span.finish()` does not accept a `hub` parameter anymore.
14+
- The `Profile()` constructor does not accept a `hub` parameter anymore.
15+
- A `Profile` object does not have a `.hub` property anymore.
16+
1217
### Removed
1318

19+
- Class `Hub` has been removed.
20+
- Class `_ScopeManager` has been removed.
21+
- The context manager `auto_session_tracking()` has been removed. Use `track_session()` instead.
22+
- The context manager `auto_session_tracking_scope()` has been removed. Use `track_session()` instead.
23+
- Utility function `is_auto_session_tracking_enabled()` has been removed. There is no public replacement. There is a private `_is_auto_session_tracking_enabled()` (if you absolutely need this function) It accepts a `scope` parameter instead of the previously used `hub` parameter.
24+
- Utility function `is_auto_session_tracking_enabled_scope()` has been removed. There is no public replacement. There is a private `_is_auto_session_tracking_enabled()` (if you absolutely need this function)
25+
1426
### Deprecated
1527

1628

docs/apidocs.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
API Docs
33
========
44

5-
.. autoclass:: sentry_sdk.Hub
6-
:members:
7-
85
.. autoclass:: sentry_sdk.Scope
96
:members:
107

sentry_sdk/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from sentry_sdk.consts import VERSION # noqa
88

99
__all__ = [ # noqa
10-
"Hub",
1110
"Scope",
1211
"Client",
1312
"Transport",
@@ -50,6 +49,3 @@
5049

5150
init_debug_support()
5251
del init_debug_support
53-
54-
# circular imports
55-
from sentry_sdk.hub import Hub

0 commit comments

Comments
 (0)