Skip to content

Commit

Permalink
Revert gql changes
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex committed Mar 18, 2024
1 parent 4b90191 commit 85c1a1f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sentry_sdk/integrations/gql.py
@@ -1,8 +1,4 @@
from sentry_sdk.utils import (
event_from_exception,
ensure_integration_enabled,
parse_version,
)
from sentry_sdk.utils import event_from_exception, parse_version
from sentry_sdk.hub import Hub, _should_send_default_pii
from sentry_sdk.integrations import DidNotEnable, Integration

Expand Down Expand Up @@ -89,11 +85,13 @@ def _patch_execute():
# type: () -> None
real_execute = gql.Client.execute

@ensure_integration_enabled(GQLIntegration, real_execute)
def sentry_patched_execute(self, document, *args, **kwargs):
# type: (gql.Client, DocumentNode, Any, Any) -> Any
hub = Hub.current
with hub.configure_scope() as scope:
if hub.get_integration(GQLIntegration) is None:
return real_execute(self, document, *args, **kwargs)

with Hub.current.configure_scope() as scope:
scope.add_event_processor(_make_gql_event_processor(self, document))

try:
Expand Down

0 comments on commit 85c1a1f

Please sign in to comment.