You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moved some functionality from Hub to Client:
- Capture Event:
- moved `capture_event` from Hub to Client
- created new `capture_event` in Scope that calls `capture_event` in Client
- made `capture_event` in Hub call the new `capture_event` in Scope
- Capture Exception:
- created new `capture_exception` in Scope
- made `capture_exception` in Hub call the new one in Scope
- Capture Message:
- created new `capture_message` in Scope
- made `capture_message` in Hub call the new one in Scope
- renamed `**scope_args` to `**scope_kwargs` because it contains keyword arguments.
- moved `_update_scope` from Hub to Scope and renamed it to `_merge_scopes`
This is preparation work for refactoring how we deal with Hubs and Scopes in the future.
Its properly easier to reason about this change when checking out the branch than looking at the diff.
Copy file name to clipboardExpand all lines: sentry_sdk/client.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,8 @@ class _Client(object):
156
156
forwarding them to sentry through the configured transport. It takes
157
157
the client options as keyword arguments and optionally the DSN as first
158
158
argument.
159
+
160
+
Alias of :py:class:`Client`. (Was created for better intelisense support)
159
161
"""
160
162
161
163
def__init__(self, *args, **kwargs):
@@ -560,8 +562,8 @@ def capture_event(
560
562
561
563
:param hint: Contains metadata about the event that can be read from `before_send`, such as the original exception object or a HTTP request object.
562
564
563
-
:param scope: An optional scope to use for determining whether this event
564
-
should be captured.
565
+
:param scope: An optional :py:class:`sentry_sdk.Scope` to apply to events.
566
+
The `scope` and `scope_kwargs` parameters are mutually exclusive.
565
567
566
568
:returns: An event ID. May be `None` if there is no DSN set or of if the SDK decided to discard the event for other reasons. In such situations setting `debug=True` on `init()` may help.
0 commit comments