@@ -102,14 +102,26 @@ def test_query_and_mutation(target_application):
102102 ("GraphQL/operation/GraphQLServer/query/<anonymous>/storage" , 1 ),
103103 (_view_metrics [framework ], 1 ),
104104 ]
105- _test_query_unscoped_metrics = [("GraphQL/all" , 1 ), ("GraphQL/GraphQLServer/all" , 1 ), ("GraphQL/allWeb" , 1 ), ("GraphQL/GraphQLServer/allWeb" , 1 ), * _test_query_scoped_metrics ]
105+ _test_query_unscoped_metrics = [
106+ ("GraphQL/all" , 1 ),
107+ ("GraphQL/GraphQLServer/all" , 1 ),
108+ ("GraphQL/allWeb" , 1 ),
109+ ("GraphQL/GraphQLServer/allWeb" , 1 ),
110+ * _test_query_scoped_metrics ,
111+ ]
106112
107113 _test_mutation_scoped_metrics = [
108114 ("GraphQL/resolve/GraphQLServer/storage_add" , 1 ),
109115 ("GraphQL/operation/GraphQLServer/mutation/<anonymous>/storage_add" , 1 ),
110116 (_view_metrics [framework ], 1 ),
111117 ]
112- _test_mutation_unscoped_metrics = [("GraphQL/all" , 1 ), ("GraphQL/GraphQLServer/all" , 1 ), ("GraphQL/allWeb" , 1 ), ("GraphQL/GraphQLServer/allWeb" , 1 ), * _test_mutation_scoped_metrics ]
118+ _test_mutation_unscoped_metrics = [
119+ ("GraphQL/all" , 1 ),
120+ ("GraphQL/GraphQLServer/all" , 1 ),
121+ ("GraphQL/allWeb" , 1 ),
122+ ("GraphQL/GraphQLServer/allWeb" , 1 ),
123+ * _test_mutation_scoped_metrics ,
124+ ]
113125
114126 _expected_mutation_operation_attributes = {
115127 "graphql.operation.type" : "mutation" ,
@@ -204,7 +216,12 @@ def test_exception_in_middleware(target_application):
204216 (f"GraphQL/operation/GraphQLServer/query/MyQuery/{ field } " , 1 ),
205217 (f"GraphQL/resolve/GraphQLServer/{ field } " , 1 ),
206218 ]
207- _test_exception_rollup_metrics = [("Errors/all" , 1 ), ("Errors/allWeb" , 1 ), ("Errors/WebTransaction/GraphQL/component_graphqlserver.test_graphql:error_middleware" , 1 ), * _test_exception_scoped_metrics ]
219+ _test_exception_rollup_metrics = [
220+ ("Errors/all" , 1 ),
221+ ("Errors/allWeb" , 1 ),
222+ ("Errors/WebTransaction/GraphQL/component_graphqlserver.test_graphql:error_middleware" , 1 ),
223+ * _test_exception_scoped_metrics ,
224+ ]
208225
209226 # Attributes
210227 _expected_exception_resolver_attributes = {
@@ -247,7 +264,12 @@ def test_exception_in_resolver(target_application, field):
247264 (f"GraphQL/operation/GraphQLServer/query/MyQuery/{ field } " , 1 ),
248265 (f"GraphQL/resolve/GraphQLServer/{ field } " , 1 ),
249266 ]
250- _test_exception_rollup_metrics = [("Errors/all" , 1 ), ("Errors/allWeb" , 1 ), (f"Errors/WebTransaction/GraphQL/{ txn_name } " , 1 ), * _test_exception_scoped_metrics ]
267+ _test_exception_rollup_metrics = [
268+ ("Errors/all" , 1 ),
269+ ("Errors/allWeb" , 1 ),
270+ (f"Errors/WebTransaction/GraphQL/{ txn_name } " , 1 ),
271+ * _test_exception_scoped_metrics ,
272+ ]
251273
252274 # Attributes
253275 _expected_exception_resolver_attributes = {
@@ -302,7 +324,12 @@ def test_exception_in_validation(target_application, is_graphql_2, query, exc_cl
302324 exc_class = callable_name (GraphQLError )
303325
304326 _test_exception_scoped_metrics = [("GraphQL/operation/GraphQLServer/<unknown>/<anonymous>/<unknown>" , 1 )]
305- _test_exception_rollup_metrics = [("Errors/all" , 1 ), ("Errors/allWeb" , 1 ), (f"Errors/WebTransaction/GraphQL/{ txn_name } " , 1 ), * _test_exception_scoped_metrics ]
327+ _test_exception_rollup_metrics = [
328+ ("Errors/all" , 1 ),
329+ ("Errors/allWeb" , 1 ),
330+ (f"Errors/WebTransaction/GraphQL/{ txn_name } " , 1 ),
331+ * _test_exception_scoped_metrics ,
332+ ]
306333
307334 # Attributes
308335 _expected_exception_operation_attributes = {
0 commit comments