Skip to content

Commit 85c1a1f

Browse files
Revert gql changes
1 parent 4b90191 commit 85c1a1f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

sentry_sdk/integrations/gql.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
from sentry_sdk.utils import (
2-
event_from_exception,
3-
ensure_integration_enabled,
4-
parse_version,
5-
)
1+
from sentry_sdk.utils import event_from_exception, parse_version
62
from sentry_sdk.hub import Hub, _should_send_default_pii
73
from sentry_sdk.integrations import DidNotEnable, Integration
84

@@ -89,11 +85,13 @@ def _patch_execute():
8985
# type: () -> None
9086
real_execute = gql.Client.execute
9187

92-
@ensure_integration_enabled(GQLIntegration, real_execute)
9388
def sentry_patched_execute(self, document, *args, **kwargs):
9489
# type: (gql.Client, DocumentNode, Any, Any) -> Any
9590
hub = Hub.current
96-
with hub.configure_scope() as scope:
91+
if hub.get_integration(GQLIntegration) is None:
92+
return real_execute(self, document, *args, **kwargs)
93+
94+
with Hub.current.configure_scope() as scope:
9795
scope.add_event_processor(_make_gql_event_processor(self, document))
9896

9997
try:

0 commit comments

Comments
 (0)