[[
  {
    "name": "mysql.query",
    "service": "mysql",
    "resource": "select 'Jellysmack'",
    "trace_id": 0,
    "span_id": 1,
    "parent_id": 0,
    "type": "sql",
    "error": 0,
    "meta": {
      "_dd.base_service": "tests.contrib.aiomysql",
      "_dd.p.dm": "-0",
      "_dd.p.tid": "654a694400000000",
      "component": "aiomysql",
      "db.name": "test",
      "db.system": "mysql",
      "db.user": "test",
      "language": "python",
      "out.host": "127.0.0.1",
      "runtime-id": "5fd399879b2c43628ee3ab3b6470b8b7",
      "server.address": "127.0.0.1",
      "span.kind": "client"
    },
    "metrics": {
      "_dd.measured": 1,
      "_dd.top_level": 1,
      "_dd.tracer_kr": 1.0,
      "_sampling_priority_v1": 1,
      "db.row_count": 1,
      "db.rownumber": 0,
      "network.destination.port": 3306,
      "process_id": 51883
    },
    "duration": 6833000,
    "start": 1667240729105451000
  }],
[
  {
    "name": "mysql.query",
    "service": "mysql",
    "resource": "select * from some_non_existant_table",
    "trace_id": 1,
    "span_id": 1,
    "parent_id": 0,
    "type": "sql",
    "error": 1,
    "meta": {
      "_dd.base_service": "tests.contrib.aiomysql",
      "_dd.p.dm": "-0",
      "_dd.p.tid": "654a694400000000",
      "component": "aiomysql",
      "db.name": "test",
      "db.system": "mysql",
      "db.user": "test",
      "error.message": "(1146, \"Table 'test.some_non_existant_table' doesn't exist\")",
      "error.stack": "Traceback (most recent call last):\n  File \"/Users/kverhoog/dev/dd-trace-py/ddtrace/contrib/aiomysql/patch.py\", line 69, in _trace_method\n    result = await method(*args, **kwargs)\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/cursors.py\", line 239, in execute\n    await self._query(query)\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/cursors.py\", line 457, in _query\n    await conn.query(q)\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/connection.py\", line 469, in query\n    await self._read_query_result(unbuffered=unbuffered)\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/connection.py\", line 672, in _read_query_result\n    await result.read()\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/connection.py\", line 1157, in read\n    first_packet = await self.connection._read_packet()\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/aiomysql/connection.py\", line 641, in _read_packet\n    packet.raise_for_error()\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/pymysql/protocol.py\", line 221, in raise_for_error\n    err.raise_mysql_exception(self._data)\n  File \"/Users/kverhoog/dev/dd-trace-py/.venv/lib/python3.10/site-packages/pymysql/err.py\", line 143, in raise_mysql_exception\n    raise errorclass(errno, errval)\npymysql.err.ProgrammingError: (1146, \"Table 'test.some_non_existant_table' doesn't exist\")\n",
      "error.type": "pymysql.err.ProgrammingError",
      "language": "python",
      "out.host": "127.0.0.1",
      "runtime-id": "5fd399879b2c43628ee3ab3b6470b8b7",
      "server.address": "127.0.0.1",
      "span.kind": "client"
    },
    "metrics": {
      "_dd.measured": 1,
      "_dd.top_level": 1,
      "_dd.tracer_kr": 1.0,
      "_sampling_priority_v1": 1,
      "db.row_count": 0,
      "db.rownumber": 0,
      "network.destination.port": 3306,
      "process_id": 51883
    },
    "duration": 8135000,
    "start": 1667240729138420000
  }]]
