diff --git a/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_execute.json b/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_execute.json index b22f6979794..cd456204072 100644 --- a/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_execute.json +++ b/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_execute.json @@ -1,113 +1,110 @@ -[ - [ - { - "name": "graphql.request", - "service": "graphql", - "resource": "{ patron { id name age } }", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphene", - "_dd.p.dm": "-0", - "_dd.p.tid": "679ba78900000000", - "component": "graphql", - "error.message": "exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id\n", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738254217957740000, \"attributes\": {\"message\": \"exception was raised in a graphene query\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 242, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 26, in resolve_patron\\n raise Exception(\\\"exception was raised in a graphene query\\\")\\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\\n\\nGraphQL request:3:7\\n2 | {\\n3 | patron {\\n | ^\\n4 | id\\n\", \"path\": \"patron\"}}]", - "language": "python", - "runtime-id": "8203164c8f8a4840943bf798c4daea9a" - }, - "metrics": { - "_dd.measured": 1, - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 62451 - }, - "duration": 5396000, - "start": 1738254217952345000 +[[ + { + "name": "graphql.request", + "service": "graphql", + "resource": "{ patron { id name age } }", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphene", + "_dd.p.dm": "-0", + "_dd.p.tid": "679ba78900000000", + "component": "graphql", + "error.message": "exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id\n", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738254217957740000, \"attributes\": {\"message\": \"exception was raised in a graphene query\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 242, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 26, in resolve_patron\\n raise Exception(\\\"exception was raised in a graphene query\\\")\\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\\n\\nGraphQL request:3:7\\n2 | {\\n3 | patron {\\n | ^\\n4 | id\\n\", \"path\": \"patron\"}}]", + "language": "python", + "runtime-id": "8203164c8f8a4840943bf798c4daea9a" }, - { - "name": "graphql.parse", - "service": "graphql", - "resource": "graphql.parse", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphene", - "component": "graphql", - "graphql.source": "{ patron { id name age } }" - }, - "duration": 828000, - "start": 1738254217952815000 + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 62451 }, - { - "name": "graphql.validate", - "service": "graphql", - "resource": "graphql.validate", - "trace_id": 0, - "span_id": 3, - "parent_id": 1, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphene", - "component": "graphql", - "graphql.source": "{ patron { id name age } }" - }, - "duration": 2534000, - "start": 1738254217954222000 - }, - { - "name": "graphql.execute", - "service": "graphql", - "resource": "{ patron { id name age } }", - "trace_id": 0, - "span_id": 4, - "parent_id": 1, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphene", - "component": "graphql", - "error.message": "exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id\n", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738254217957645000, \"attributes\": {\"message\": \"exception was raised in a graphene query\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 242, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 26, in resolve_patron\\n raise Exception(\\\"exception was raised in a graphene query\\\")\\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\\n\\nGraphQL request:3:7\\n2 | {\\n3 | patron {\\n | ^\\n4 | id\\n\", \"path\": \"patron\"}}]", - "graphql.operation.type": "query", - "graphql.source": "{ patron { id name age } }" - }, - "metrics": { - "_dd.measured": 1 - }, - "duration": 803000, - "start": 1738254217956843000 - }, - { - "name": "graphql.resolve", - "service": "graphql", - "resource": "patron", - "trace_id": 0, - "span_id": 5, - "parent_id": 4, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphene", - "component": "graphql", - "error.message": "exception was raised in a graphene query", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\nException: exception was raised in a graphene query\n", - "error.type": "builtins.Exception" - }, - "duration": 430000, - "start": 1738254217956914000 - } - ] -] \ No newline at end of file + "duration": 5396000, + "start": 1738254217952345000 + }, + { + "name": "graphql.parse", + "service": "graphql", + "resource": "graphql.parse", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphene", + "component": "graphql", + "graphql.source": "{ patron { id name age } }" + }, + "duration": 828000, + "start": 1738254217952815000 + }, + { + "name": "graphql.validate", + "service": "graphql", + "resource": "graphql.validate", + "trace_id": 0, + "span_id": 3, + "parent_id": 1, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphene", + "component": "graphql", + "graphql.source": "{ patron { id name age } }" + }, + "duration": 2534000, + "start": 1738254217954222000 + }, + { + "name": "graphql.execute", + "service": "graphql", + "resource": "{ patron { id name age } }", + "trace_id": 0, + "span_id": 4, + "parent_id": 1, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphene", + "component": "graphql", + "error.message": "exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\n\nGraphQL request:3:7\n2 | {\n3 | patron {\n | ^\n4 | id\n", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738254217957645000, \"attributes\": {\"message\": \"exception was raised in a graphene query\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 242, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 26, in resolve_patron\\n raise Exception(\\\"exception was raised in a graphene query\\\")\\ngraphql.error.graphql_error.GraphQLError: exception was raised in a graphene query\\n\\nGraphQL request:3:7\\n2 | {\\n3 | patron {\\n | ^\\n4 | id\\n\", \"path\": \"patron\"}}]", + "graphql.operation.type": "query", + "graphql.source": "{ patron { id name age } }" + }, + "metrics": { + "_dd.measured": 1 + }, + "duration": 803000, + "start": 1738254217956843000 + }, + { + "name": "graphql.resolve", + "service": "graphql", + "resource": "patron", + "trace_id": 0, + "span_id": 5, + "parent_id": 4, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphene", + "component": "graphql", + "error.message": "exception was raised in a graphene query", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 242, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 26, in resolve_patron\n raise Exception(\"exception was raised in a graphene query\")\nException: exception was raised in a graphene query\n", + "error.type": "builtins.Exception" + }, + "duration": 430000, + "start": 1738254217956914000 + }]] diff --git a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_error.json b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_error.json index 21f6c933024..c19d700c1a3 100644 --- a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_error.json +++ b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_error.json @@ -1,71 +1,68 @@ -[ - [ - { - "name": "graphql.request", - "service": "graphql", - "resource": "query my_query{ invalid_schema }", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "_dd.p.dm": "-0", - "_dd.p.tid": "679b96df00000000", - "component": "graphql", - "error.message": "Cannot query field 'invalid_schema' on type 'RootQueryType'.\n\nGraphQL request:1:17\n1 | query my_query{ invalid_schema }\n | ^", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738249951802662000, \"attributes\": {\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"1:17\"}}]", - "language": "python", - "runtime-id": "9a4c224e6fdd49cea07a7a3954fd5db7" - }, - "metrics": { - "_dd.measured": 1, - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 26822 - }, - "duration": 1221000, - "start": 1738249951801442000 +[[ + { + "name": "graphql.request", + "service": "graphql", + "resource": "query my_query{ invalid_schema }", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "_dd.p.dm": "-0", + "_dd.p.tid": "679b96df00000000", + "component": "graphql", + "error.message": "Cannot query field 'invalid_schema' on type 'RootQueryType'.\n\nGraphQL request:1:17\n1 | query my_query{ invalid_schema }\n | ^", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738249951802662000, \"attributes\": {\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"1:17\"}}]", + "language": "python", + "runtime-id": "9a4c224e6fdd49cea07a7a3954fd5db7" }, - { - "name": "graphql.parse", - "service": "graphql", - "resource": "graphql.parse", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "graphql.source": "query my_query{ invalid_schema }" - }, - "duration": 143000, - "start": 1738249951801693000 + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 26822 }, - { - "name": "graphql.validate", - "service": "graphql", - "resource": "graphql.validate", - "trace_id": 0, - "span_id": 3, - "parent_id": 1, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "error.message": "Cannot query field 'invalid_schema' on type 'RootQueryType'.\n\nGraphQL request:1:17\n1 | query my_query{ invalid_schema }\n | ^", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738249951802627000, \"attributes\": {\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"1:17\"}}]", - "graphql.source": "query my_query{ invalid_schema }" - }, - "duration": 745000, - "start": 1738249951801884000 - } - ] -] \ No newline at end of file + "duration": 1221000, + "start": 1738249951801442000 + }, + { + "name": "graphql.parse", + "service": "graphql", + "resource": "graphql.parse", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "graphql.source": "query my_query{ invalid_schema }" + }, + "duration": 143000, + "start": 1738249951801693000 + }, + { + "name": "graphql.validate", + "service": "graphql", + "resource": "graphql.validate", + "trace_id": 0, + "span_id": 3, + "parent_id": 1, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "error.message": "Cannot query field 'invalid_schema' on type 'RootQueryType'.\n\nGraphQL request:1:17\n1 | query my_query{ invalid_schema }\n | ^", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738249951802627000, \"attributes\": {\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"1:17\"}}]", + "graphql.source": "query my_query{ invalid_schema }" + }, + "duration": 745000, + "start": 1738249951801884000 + }]] diff --git a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail.json b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail.json index c8d18434d41..b644d1844d9 100644 --- a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail.json +++ b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail.json @@ -1,142 +1,138 @@ +[[ + { + "name": "graphql.parse", + "service": "graphql", + "resource": "graphql.parse", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "_dd.p.dm": "-0", + "_dd.p.tid": "679b976d00000000", + "component": "graphql", + "graphql.source": "type Query { fail: String }", + "language": "python", + "runtime-id": "596dfe80a9184851a69f62836436abe5" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 27630 + }, + "duration": 257000, + "start": 1738250093732371000 + }], [ - [ + { + "name": "graphql.request", + "service": "graphql", + "resource": "query { fail }", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "_dd.p.dm": "-0", + "_dd.p.tid": "679b976d00000000", + "component": "graphql", + "error.message": "'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }\n", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738250093735707000, \"attributes\": {\"message\": \"'NoneType' object has no attribute 'name'\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 243, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\", \"path\": \"fail\"}}]", + "language": "python", + "runtime-id": "596dfe80a9184851a69f62836436abe5" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 27630 + }, + "duration": 1681000, + "start": 1738250093734027000 + }, + { + "name": "graphql.parse", + "service": "graphql", + "resource": "graphql.parse", + "trace_id": 1, + "span_id": 2, + "parent_id": 1, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "graphql.source": "query { fail }" + }, + "duration": 128000, + "start": 1738250093734164000 + }, + { + "name": "graphql.validate", + "service": "graphql", + "resource": "graphql.validate", + "trace_id": 1, + "span_id": 3, + "parent_id": 1, + "type": "graphql", + "error": 0, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "graphql.source": "query { fail }" + }, + "duration": 493000, + "start": 1738250093734336000 + }, + { + "name": "graphql.execute", + "service": "graphql", + "resource": "query { fail }", + "trace_id": 1, + "span_id": 4, + "parent_id": 1, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "error.message": "'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }\n", + "error.type": "graphql.error.graphql_error.GraphQLError", + "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738250093735623000, \"attributes\": {\"message\": \"'NoneType' object has no attribute 'name'\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 243, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\", \"path\": \"fail\"}}]", + "graphql.operation.type": "query", + "graphql.source": "query { fail }" + }, + "metrics": { + "_dd.measured": 1 + }, + "duration": 761000, + "start": 1738250093734863000 + }, { - "name": "graphql.parse", - "service": "graphql", - "resource": "graphql.parse", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "_dd.p.dm": "-0", - "_dd.p.tid": "679b976d00000000", - "component": "graphql", - "graphql.source": "type Query { fail: String }", - "language": "python", - "runtime-id": "596dfe80a9184851a69f62836436abe5" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 27630 - }, - "duration": 257000, - "start": 1738250093732371000 - } - ], - [ - { - "name": "graphql.request", - "service": "graphql", - "resource": "query { fail }", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "_dd.p.dm": "-0", - "_dd.p.tid": "679b976d00000000", - "component": "graphql", - "error.message": "'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }\n", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738250093735707000, \"attributes\": {\"message\": \"'NoneType' object has no attribute 'name'\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 243, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\", \"path\": \"fail\"}}]", - "language": "python", - "runtime-id": "596dfe80a9184851a69f62836436abe5" - }, - "metrics": { - "_dd.measured": 1, - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 27630 - }, - "duration": 1681000, - "start": 1738250093734027000 - }, - { - "name": "graphql.parse", - "service": "graphql", - "resource": "graphql.parse", - "trace_id": 1, - "span_id": 2, - "parent_id": 1, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "graphql.source": "query { fail }" - }, - "duration": 128000, - "start": 1738250093734164000 - }, - { - "name": "graphql.validate", - "service": "graphql", - "resource": "graphql.validate", - "trace_id": 1, - "span_id": 3, - "parent_id": 1, - "type": "graphql", - "error": 0, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "graphql.source": "query { fail }" - }, - "duration": 493000, - "start": 1738250093734336000 - }, - { - "name": "graphql.execute", - "service": "graphql", - "resource": "query { fail }", - "trace_id": 1, - "span_id": 4, - "parent_id": 1, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "error.message": "'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\n\nGraphQL request:3:7\n2 | query {\n3 | fail\n | ^\n4 | }\n", - "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1738250093735623000, \"attributes\": {\"message\": \"'NoneType' object has no attribute 'name'\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": \"3:7\", \"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py31013_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.10/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 243, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\", \"path\": \"fail\"}}]", - "graphql.operation.type": "query", - "graphql.source": "query { fail }" - }, - "metrics": { - "_dd.measured": 1 - }, - "duration": 761000, - "start": 1738250093734863000 - }, - { - "name": "graphql.resolve", - "service": "graphql", - "resource": "fail", - "trace_id": 1, - "span_id": 5, - "parent_id": 4, - "type": "graphql", - "error": 1, - "meta": { - "_dd.base_service": "tests.contrib.graphql", - "component": "graphql", - "error.message": "'NoneType' object has no attribute 'name'", - "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\nAttributeError: 'NoneType' object has no attribute 'name'\n", - "error.type": "builtins.AttributeError" - }, - "duration": 424000, - "start": 1738250093734961000 - } - ] -] \ No newline at end of file + "name": "graphql.resolve", + "service": "graphql", + "resource": "fail", + "trace_id": 1, + "span_id": 5, + "parent_id": 4, + "type": "graphql", + "error": 1, + "meta": { + "_dd.base_service": "tests.contrib.graphql", + "component": "graphql", + "error.message": "'NoneType' object has no attribute 'name'", + "error.stack": "Traceback (most recent call last):\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 243, in _resolver_middleware\n return next_middleware(root, info, **args)\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n result = graphql_sync(test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name])\nAttributeError: 'NoneType' object has no attribute 'name'\n", + "error.type": "builtins.AttributeError" + }, + "duration": 424000, + "start": 1738250093734961000 + }]]