|
8 | 8 | from typing import TYPE_CHECKING, List, Dict, cast, overload
|
9 | 9 | import warnings
|
10 | 10 |
|
| 11 | +import sentry_sdk |
11 | 12 | from sentry_sdk._compat import PY37, check_uwsgi_thread_support
|
12 | 13 | from sentry_sdk.utils import (
|
13 | 14 | AnnotatedValue,
|
@@ -215,8 +216,8 @@ def capture_event(self, *args, **kwargs):
|
215 | 216 | # type: (*Any, **Any) -> Optional[str]
|
216 | 217 | return None
|
217 | 218 |
|
218 |
| - def _capture_experimental_log(self, scope, log): |
219 |
| - # type: (Scope, Log) -> None |
| 219 | + def _capture_experimental_log(self, log): |
| 220 | + # type: (Log) -> None |
220 | 221 | pass
|
221 | 222 |
|
222 | 223 | def capture_session(self, *args, **kwargs):
|
@@ -893,12 +894,14 @@ def capture_event(
|
893 | 894 |
|
894 | 895 | return return_value
|
895 | 896 |
|
896 |
| - def _capture_experimental_log(self, current_scope, log): |
897 |
| - # type: (Scope, Log) -> None |
| 897 | + def _capture_experimental_log(self, log): |
| 898 | + # type: (Log) -> None |
898 | 899 | logs_enabled = self.options["_experiments"].get("enable_logs", False)
|
899 | 900 | if not logs_enabled:
|
900 | 901 | return
|
901 |
| - isolation_scope = current_scope.get_isolation_scope() |
| 902 | + |
| 903 | + current_scope = sentry_sdk.get_current_scope() |
| 904 | + isolation_scope = sentry_sdk.get_isolation_scope() |
902 | 905 |
|
903 | 906 | log["attributes"]["sentry.sdk.name"] = SDK_INFO["name"]
|
904 | 907 | log["attributes"]["sentry.sdk.version"] = SDK_INFO["version"]
|
|
0 commit comments