|
3 | 3 | import sentry_sdk |
4 | 4 | from sentry_sdk.consts import OP |
5 | 5 | from sentry_sdk.integrations import DidNotEnable, Integration, _check_minimum_version |
6 | | -from sentry_sdk.scope import should_send_default_pii |
7 | 6 | from sentry_sdk.utils import ( |
8 | 7 | capture_internal_exceptions, |
9 | 8 | ensure_integration_enabled, |
10 | 9 | event_from_exception, |
11 | | - has_data_collection_enabled, |
12 | 10 | parse_version, |
13 | 11 | ) |
14 | 12 |
|
@@ -112,13 +110,7 @@ async def _sentry_patched_graphql_async( |
112 | 110 | def _event_processor(event: "Event", hint: "Dict[str, Any]") -> "Event": |
113 | 111 | client_options = sentry_sdk.get_client().options |
114 | 112 |
|
115 | | - if has_data_collection_enabled(client_options): |
116 | | - if client_options["data_collection"]["graphql"]["document"]: |
117 | | - request_info = event.setdefault("request", {}) |
118 | | - request_info["api_target"] = "graphql" |
119 | | - elif event.get("request", {}).get("data"): |
120 | | - del event["request"]["data"] |
121 | | - elif should_send_default_pii(): |
| 113 | + if client_options["data_collection"]["graphql"]["document"]: |
122 | 114 | request_info = event.setdefault("request", {}) |
123 | 115 | request_info["api_target"] = "graphql" |
124 | 116 | elif event.get("request", {}).get("data"): |
@@ -159,10 +151,7 @@ def graphql_span( |
159 | 151 | return |
160 | 152 |
|
161 | 153 | additional_attributes = {} |
162 | | - if has_data_collection_enabled(client_options): |
163 | | - if client_options["data_collection"]["graphql"]["document"]: |
164 | | - additional_attributes["graphql.document"] = source |
165 | | - elif should_send_default_pii(): |
| 154 | + if client_options["data_collection"]["graphql"]["document"]: |
166 | 155 | additional_attributes["graphql.document"] = source |
167 | 156 |
|
168 | 157 | _graphql_span = sentry_sdk.start_span( |
|
0 commit comments