File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 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
6
2
from sentry_sdk .hub import Hub , _should_send_default_pii
7
3
from sentry_sdk .integrations import DidNotEnable , Integration
8
4
@@ -89,11 +85,13 @@ def _patch_execute():
89
85
# type: () -> None
90
86
real_execute = gql .Client .execute
91
87
92
- @ensure_integration_enabled (GQLIntegration , real_execute )
93
88
def sentry_patched_execute (self , document , * args , ** kwargs ):
94
89
# type: (gql.Client, DocumentNode, Any, Any) -> Any
95
90
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 :
97
95
scope .add_event_processor (_make_gql_event_processor (self , document ))
98
96
99
97
try :
You can’t perform that action at this time.
0 commit comments