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 cd456204072..e3afa039915 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 @@ -16,7 +16,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738254217957740000,\"attributes\": {\"locations\": \"3:7\",\"message\": \"exception was raised in a graphene query\",\"path\": \"patron\",\"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\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "language": "python", "runtime-id": "8203164c8f8a4840943bf798c4daea9a" }, @@ -79,7 +79,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738254217957645000,\"attributes\": {\"locations\": \"3:7\",\"message\": \"exception was raised in a graphene query\",\"path\": \"patron\",\"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\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "graphql.operation.type": "query", "graphql.source": "{ patron { id name age } }" }, diff --git a/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_extensions.json b/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_extensions.json index b1112f8d3c6..f578795f1ee 100644 --- a/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_extensions.json +++ b/tests/snapshots/tests.contrib.graphene.test_graphene.test_schema_failing_extensions.json @@ -16,7 +16,7 @@ "error.message": "User not found\n\nGraphQL request:1:3\n1 | { user(id: \"999\") }\n | ^", "error.stack": "Traceback (most recent call last):\n\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 35, in resolve_user\n raise graphql.error.GraphQLError(\n\ngraphql.error.graphql_error.GraphQLError: User not found\n\nGraphQL request:1:3\n1 | { user(id: \"999\") }\n | ^\n", "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1739902628776246000, \"attributes\": {\"message\": \"User not found\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": [\"1:3\"], \"stacktrace\": \"Traceback (most recent call last):\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 35, in resolve_user\\n raise graphql.error.GraphQLError(\\n\\ngraphql.error.graphql_error.GraphQLError: User not found\\n\\nGraphQL request:1:3\\n1 | { user(id: \\\"999\\\") }\\n | ^\\n\", \"path\": \"user\", \"extensions.code\": \"USER_NOT_FOUND\", \"extensions.status\": 404}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1739902628776246000,\"attributes\": {\"extensions.code\": \"USER_NOT_FOUND\",\"extensions.status\": 404,\"locations\": [\"1:3\"],\"message\": \"User not found\",\"path\": \"user\",\"stacktrace\": \"Traceback (most recent call last):\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 35, in resolve_user\\n raise graphql.error.GraphQLError(\\n\\ngraphql.error.graphql_error.GraphQLError: User not found\\n\\nGraphQL request:1:3\\n1 | { user(id: \\\"999\\\") }\\n | ^\\n\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "language": "python", "runtime-id": "8cbbf6dde3964c80b5a6a70abc93ac87" }, @@ -79,7 +79,7 @@ "error.message": "User not found\n\nGraphQL request:1:3\n1 | { user(id: \"999\") }\n | ^", "error.stack": "Traceback (most recent call last):\n\n File \"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\", line 617, in resolve_field\n result = resolve_fn(source, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\", line 35, in resolve_user\n raise graphql.error.GraphQLError(\n\ngraphql.error.graphql_error.GraphQLError: User not found\n\nGraphQL request:1:3\n1 | { user(id: \"999\") }\n | ^\n", "error.type": "graphql.error.graphql_error.GraphQLError", - "events": "[{\"name\": \"dd.graphql.query.error\", \"time_unix_nano\": 1739902628776152000, \"attributes\": {\"message\": \"User not found\", \"type\": \"graphql.error.graphql_error.GraphQLError\", \"locations\": [\"1:3\"], \"stacktrace\": \"Traceback (most recent call last):\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 35, in resolve_user\\n raise graphql.error.GraphQLError(\\n\\ngraphql.error.graphql_error.GraphQLError: User not found\\n\\nGraphQL request:1:3\\n1 | { user(id: \\\"999\\\") }\\n | ^\\n\", \"path\": \"user\", \"extensions.code\": \"USER_NOT_FOUND\", \"extensions.status\": 404}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1739902628776152000,\"attributes\": {\"extensions.code\": \"USER_NOT_FOUND\",\"extensions.status\": 404,\"locations\": [\"1:3\"],\"message\": \"User not found\",\"path\": \"user\",\"stacktrace\": \"Traceback (most recent call last):\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_graphene~300_pytest-asyncio0211_graphql-relay_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 617, in resolve_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphene/test_graphene.py\\\", line 35, in resolve_user\\n raise graphql.error.GraphQLError(\\n\\ngraphql.error.graphql_error.GraphQLError: User not found\\n\\nGraphQL request:1:3\\n1 | { user(id: \\\"999\\\") }\\n | ^\\n\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "graphql.operation.type": "query", "graphql.source": "{ user(id: \"999\") }" }, 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 c19d700c1a3..bb004ea1d53 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 @@ -15,7 +15,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738249951802662000,\"attributes\": {\"locations\": \"1:17\",\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "language": "python", "runtime-id": "9a4c224e6fdd49cea07a7a3954fd5db7" }, @@ -60,7 +60,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738249951802627000,\"attributes\": {\"locations\": \"1:17\",\"message\": \"Cannot query field 'invalid_schema' on type 'RootQueryType'.\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "graphql.source": "query my_query{ invalid_schema }" }, "duration": 745000, 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 b644d1844d9..c5b4df656da 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 @@ -44,7 +44,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738250093735707000,\"attributes\": {\"locations\": \"3:7\",\"message\": \"'NoneType' object has no attribute 'name'\",\"path\": \"fail\",\"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\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "language": "python", "runtime-id": "596dfe80a9184851a69f62836436abe5" }, @@ -107,7 +107,7 @@ "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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1738250093735623000,\"attributes\": {\"locations\": \"3:7\",\"message\": \"'NoneType' object has no attribute 'name'\",\"path\": \"fail\",\"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\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "graphql.operation.type": "query", "graphql.source": "query { fail }" }, diff --git a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail_2.x.json b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail_2.x.json index 0b307de313e..ab7793f05c4 100644 --- a/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail_2.x.json +++ b/tests/snapshots/tests.contrib.graphql.test_graphql.test_graphql_fail_2.x.json @@ -44,7 +44,7 @@ "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_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 253, in _resolver_middleware\n return next_middleware(root, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\n ^^^^^^^^^^\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\": 1744038805827710000, \"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_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 253, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\\n ^^^^^^^^^^\\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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1744038805827710000,\"attributes\": {\"locations\": [\"3:7\"],\"message\": \"'NoneType' object has no attribute 'name'\",\"path\": \"fail\",\"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 253, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\\n ^^^^^^^^^^\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "language": "python", "runtime-id": "e03a446c4168427390fa1561d97ffdbd" }, @@ -107,7 +107,7 @@ "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_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\", line 521, in execute_field\n result = resolve_fn(source, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\", line 253, in _resolver_middleware\n return next_middleware(root, info, **args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\", line 104, in \n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\n ^^^^^^^^^^\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\": 1744038805827554000, \"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_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 253, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\\n ^^^^^^^^^^\\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\"}}]", + "events": "[{\"name\": \"dd.graphql.query.error\",\"time_unix_nano\": 1744038805827554000,\"attributes\": {\"locations\": [\"3:7\"],\"message\": \"'NoneType' object has no attribute 'name'\",\"path\": \"fail\",\"stacktrace\": \"Traceback (most recent call last):\\n File \\\"/Users/quinna.halim/dd-trace-py/.riot/venv_py3127_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_pytest-asyncio0211_graphql-core~320_pytest-randomly/lib/python3.12/site-packages/graphql/execution/execute.py\\\", line 521, in execute_field\\n result = resolve_fn(source, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/ddtrace/contrib/internal/graphql/patch.py\\\", line 253, in _resolver_middleware\\n return next_middleware(root, info, **args)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"/Users/quinna.halim/dd-trace-py/tests/contrib/graphql/test_graphql.py\\\", line 104, in \\n test_schema, query, root_value=None, field_resolver=lambda _type, _field: resolvers[_type.name][_field.name]\\n ^^^^^^^^^^\\ngraphql.error.graphql_error.GraphQLError: 'NoneType' object has no attribute 'name'\\n\\nGraphQL request:3:7\\n2 | query {\\n3 | fail\\n | ^\\n4 | }\\n\",\"type\": \"graphql.error.graphql_error.GraphQLError\"}}]", "graphql.operation.type": "query", "graphql.source": "query { fail }" }, diff --git a/tests/snapshots/tests.opentelemetry.test_span.test_otel_span_events.json b/tests/snapshots/tests.opentelemetry.test_span.test_otel_span_events.json index d66af11d70b..d3a4fc4809a 100644 --- a/tests/snapshots/tests.opentelemetry.test_span.test_otel_span_events.json +++ b/tests/snapshots/tests.opentelemetry.test_span.test_otel_span_events.json @@ -11,7 +11,7 @@ "meta": { "_dd.p.dm": "-0", "_dd.p.tid": "6650be1d00000000", - "events": "[{\"name\": \"Web page unresponsive\", \"time_unix_nano\": 1714536311886000, \"attributes\": {\"error.code\": \"403\", \"unknown values\": [1, [\"h\", \"a\", [false]]]}}]", + "events": "[{\"name\": \"Web page unresponsive\",\"time_unix_nano\": 1714536311886000,\"attributes\": {\"error.code\": \"403\",\"unknown values\": [1,[\"h\",\"a\",[false]]]}}]", "language": "python", "runtime-id": "236113d2484c485fb40ba896b12c1992" }, @@ -37,7 +37,7 @@ "meta": { "_dd.p.dm": "-0", "_dd.p.tid": "6650be1d00000000", - "events": "[{\"name\": \"Web page loaded\", \"time_unix_nano\": 1714537311986000}, {\"name\": \"Button changed color\", \"time_unix_nano\": 1714537311986000, \"attributes\": {\"colors\": [112, 215, 70], \"response.time\": 134.3, \"success\": true}}]", + "events": "[{\"name\": \"Web page loaded\",\"time_unix_nano\": 1714537311986000},{\"name\": \"Button changed color\",\"time_unix_nano\": 1714537311986000,\"attributes\": {\"colors\": [112,215,70],\"response.time\": 134.3,\"success\": true}}]", "language": "python", "runtime-id": "236113d2484c485fb40ba896b12c1992" }, diff --git a/tests/snapshots/tests.opentelemetry.test_trace.test_otel_start_span_record_exception.json b/tests/snapshots/tests.opentelemetry.test_trace.test_otel_start_span_record_exception.json index a98e078f41f..a1895fca8e5 100644 --- a/tests/snapshots/tests.opentelemetry.test_trace.test_otel_start_span_record_exception.json +++ b/tests/snapshots/tests.opentelemetry.test_trace.test_otel_start_span_record_exception.json @@ -14,7 +14,7 @@ "error.message": "Sorry Otel Span, I failed you", "error.stack": "Traceback (most recent call last):\n File \"/Users/munirabdinur/go/src/github.com/DataDog/dd-trace-py/tests/opentelemetry/test_trace.py\", line 27, in test_otel_start_span_record_exception\n raise Exception(\"Sorry Otel Span, I failed you\")\nException: Sorry Otel Span, I failed you\n", "error.type": "builtins.Exception", - "events": "[{\"name\": \"exception\", \"time_unix_nano\": 1716560261227739000, \"attributes\": {\"exception.type\": \"builtins.ValueError\", \"exception.message\": \"Invalid Operation 1\", \"exception.escaped\": \"False\"}}, {\"name\": \"exception\", \"time_unix_nano\": 1716560261227739000, \"attributes\": {\"exception.type\": \"builtins.Exception\", \"exception.message\": \"Sorry Otel Span, I failed you\", \"exception.escaped\": \"True\"}}]", + "events": "[{\"name\": \"exception\",\"time_unix_nano\": 1716560261227739000,\"attributes\": {\"exception.escaped\": \"False\",\"exception.message\": \"Invalid Operation 1\",\"exception.type\": \"builtins.ValueError\"}},{\"name\": \"exception\",\"time_unix_nano\": 1716560261227739000,\"attributes\": {\"exception.escaped\": \"True\",\"exception.message\": \"Sorry Otel Span, I failed you\",\"exception.type\": \"builtins.Exception\"}}]", "language": "python", "runtime-id": "d0950ce7bda6498183acde9036abb131" }, @@ -43,7 +43,7 @@ "error.message": "MoonEar Fire!!!", "error.stack": "Fake traceback", "error.type": "RandoException", - "events": "[{\"name\": \"exception\", \"time_unix_nano\": 1716560281337739000, \"attributes\": {\"exception.type\": \"builtins.IndexError\", \"exception.message\": \"Invalid Operation 2\", \"exception.escaped\": \"False\", \"exception.stuff\": \"thing 2\"}}, {\"name\": \"exception\", \"time_unix_nano\": 1716560271237812000, \"attributes\": {\"exception.type\": \"RandoException\", \"exception.message\": \"MoonEar Fire!!!\", \"exception.escaped\": \"False\", \"exception.stacktrace\": \"Fake traceback\", \"exception.details\": \"This is FAKE, I overwrote the real exception details\"}}]", + "events": "[{\"name\": \"exception\",\"time_unix_nano\": 1716560281337739000,\"attributes\": {\"exception.escaped\": \"False\",\"exception.message\": \"Invalid Operation 2\",\"exception.stuff\": \"thing 2\",\"exception.type\": \"builtins.IndexError\"}},{\"name\": \"exception\",\"time_unix_nano\": 1716560271237812000,\"attributes\": {\"exception.details\": \"This is FAKE, I overwrote the real exception details\",\"exception.escaped\": \"False\",\"exception.message\": \"MoonEar Fire!!!\",\"exception.stacktrace\": \"Fake traceback\",\"exception.type\": \"RandoException\"}}]", "language": "python", "runtime-id": "d0950ce7bda6498183acde9036abb131" },