strawberry-graphql 0.227.5__py3-none-any.whl → 0.227.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- strawberry/extensions/tracing/datadog.py +16 -7
- {strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/RECORD +6 -6
- {strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/entry_points.txt +0 -0
@@ -27,7 +27,8 @@ class DatadogTracingExtension(SchemaExtension):
|
|
27
27
|
|
28
28
|
@cached_property
|
29
29
|
def _resource_name(self) -> str:
|
30
|
-
|
30
|
+
if self.execution_context.query is None:
|
31
|
+
return "query_missing"
|
31
32
|
|
32
33
|
query_hash = self.hash_query(self.execution_context.query)
|
33
34
|
|
@@ -78,15 +79,23 @@ class DatadogTracingExtension(SchemaExtension):
|
|
78
79
|
)
|
79
80
|
self.request_span.set_tag("graphql.operation_name", self._operation_name)
|
80
81
|
|
81
|
-
|
82
|
+
query = self.execution_context.query
|
83
|
+
|
84
|
+
if query is not None:
|
85
|
+
query = query.strip()
|
86
|
+
operation_type = "query"
|
87
|
+
|
88
|
+
if query.startswith("mutation"):
|
89
|
+
operation_type = "mutation"
|
90
|
+
elif query.startswith("subscription"): # pragma: no cover
|
91
|
+
operation_type = "subscription"
|
92
|
+
else:
|
93
|
+
operation_type = "query_missing"
|
82
94
|
|
83
|
-
operation_type = "query"
|
84
|
-
if self.execution_context.query.strip().startswith("mutation"):
|
85
|
-
operation_type = "mutation"
|
86
|
-
elif self.execution_context.query.strip().startswith("subscription"):
|
87
|
-
operation_type = "subscription"
|
88
95
|
self.request_span.set_tag("graphql.operation_type", operation_type)
|
96
|
+
|
89
97
|
yield
|
98
|
+
|
90
99
|
self.request_span.finish()
|
91
100
|
|
92
101
|
def on_validate(self) -> Generator[None, None, None]:
|
@@ -113,7 +113,7 @@ strawberry/extensions/query_depth_limiter.py,sha256=lm9KTQOCTTGzXvMWyafROhQ3MhZX
|
|
113
113
|
strawberry/extensions/runner.py,sha256=HNi0haRUbd_eGlDG-zByR5KmOylDQPCqMUsLZnzLzWo,2696
|
114
114
|
strawberry/extensions/tracing/__init__.py,sha256=wx8_EAroGhNrP4HiGYMgKo8jnCsfde5ib6lO4OvcLV0,1400
|
115
115
|
strawberry/extensions/tracing/apollo.py,sha256=ZdxxFEQi1lCpCWfCETOfcK_-Ivw-jUSg-rIKOYlm_i4,5811
|
116
|
-
strawberry/extensions/tracing/datadog.py,sha256=
|
116
|
+
strawberry/extensions/tracing/datadog.py,sha256=gFXSzavF8ahUpnLj4t2ulJDy4I_Y-1FMhCaX5P6ZL7I,5448
|
117
117
|
strawberry/extensions/tracing/opentelemetry.py,sha256=vuC8IKevMP_Vt0Q-tcHM3UkWasU4S0NhgsAHCNr3j3s,7212
|
118
118
|
strawberry/extensions/tracing/sentry.py,sha256=XxXtJ6sPVbc2ucZo_p1HroTOn2N9Dl_uUfZNAWut_XM,4954
|
119
119
|
strawberry/extensions/tracing/utils.py,sha256=O3-XJ25TqJJ9X1wHi0-0iX4U_3uv2YiB6TJfxGqtnek,618
|
@@ -241,8 +241,8 @@ strawberry/utils/logging.py,sha256=flS7hV0JiIOEdXcrIjda4WyIWix86cpHHFNJL8gl1y4,7
|
|
241
241
|
strawberry/utils/operation.py,sha256=Um-tBCPl3_bVFN2Ph7o1mnrxfxBes4HFCj6T0x4kZxE,1135
|
242
242
|
strawberry/utils/str_converters.py,sha256=avIgPVLg98vZH9mA2lhzVdyyjqzLsK2NdBw9mJQ02Xk,813
|
243
243
|
strawberry/utils/typing.py,sha256=SQVOw1nuFZk2Pe3iz0o8ebzpoyvBVoGSQZVZj6-8k7I,13483
|
244
|
-
strawberry_graphql-0.227.
|
245
|
-
strawberry_graphql-0.227.
|
246
|
-
strawberry_graphql-0.227.
|
247
|
-
strawberry_graphql-0.227.
|
248
|
-
strawberry_graphql-0.227.
|
244
|
+
strawberry_graphql-0.227.6.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
245
|
+
strawberry_graphql-0.227.6.dist-info/METADATA,sha256=YsRi6058_GNaC1KQg_-QkUehJy7yy_kkrhY56AuU_Mo,7821
|
246
|
+
strawberry_graphql-0.227.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
247
|
+
strawberry_graphql-0.227.6.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
248
|
+
strawberry_graphql-0.227.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.227.5.dist-info → strawberry_graphql-0.227.6.dist-info}/entry_points.txt
RENAMED
File without changes
|