)]}'
{"osprofiler/cmd/commands.py":[{"author":{"_account_id":11444,"name":"Radoslaw Smigielski","display_name":"Radek","email":"rsmigiel@redhat.com","username":"radek"},"change_message_id":"e98ac6aea3d486296b78c16dd5df23fc86d03474","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                depth \u003d parent_event.get(\"depth_value\", 0) + 1"},{"line_number":134,"context_line":"            e[\"depth_value\"] \u003d depth"},{"line_number":135,"context_line":"            e[\"depth\"] \u003d \"*\" * depth"},{"line_number":136,"context_line":"            e[\"host\"] \u003d e[\"info\"].get(\"host\")"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            def _get_event_details(info):"},{"line_number":139,"context_line":"                details \u003d \"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_813d89c5","line":136,"range":{"start_line":136,"start_character":12,"end_line":136,"end_character":45},"updated":"2019-04-27 15:05:03.000000000","message":"For me it fails with below error:\n\n$ osprofiler trace show --connection-string mysql+pymysql://profiler:password@[::3]/profiler e76f4cfe-75e5-4a9a-af20-bbe1edd7c164                                                               \nTraceback (most recent call last):\n  File \"/home/radek/tmp/venv3-osprofiler2/bin/osprofiler\", line 10, in \u003cmodule\u003e\n    sys.exit(main())\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/osprofiler/cmd/shell.py\", line 89, in main                                                                           \n    OSProfilerShell(args)\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/osprofiler/cmd/shell.py\", line 39, in __init__                                                                       \n    args.func(args)\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/osprofiler/cmd/commands.py\", line 73, in show                                                                        \n    report \u003d engine.build_report(trace_events)\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/osprofiler/drivers/base.py\", line 234, in build_report                                                               \n    self._events_to_spans(trace_event_iterator))\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/osprofiler/drivers/base.py\", line 182, in _events_to_spans                                                           \n    host \u003d event[\"info\"][\"host\"]\n  File \"/home/radek/tmp/venv3-osprofiler2/lib64/python3.6/site-packages/sqlalchemy/engine/result.py\", line 629, in _key_fallback                                                             \n    % expression._string_or_unprintable(key)\nsqlalchemy.exc.NoSuchColumnError: \"Could not locate column in row for column \u0027info\u0027\"    \n\n\nThis key doesn\u0027t exist:\n\n\u003e host \u003d event[\"info\"][\"host\"]\n\n\n(Pdb) event\n(3405, \u00272019-04-26T14:00:59.302572\u0027, \u0027e76f4cfe-75e5-4a9a-af20-bbe1edd7c164\u0027, \u0027e76f4cfe-75e5-4a9a-af20-bbe1edd7c164\u0027, \u002728a21098-066e-4389-9c97-338f5d657000\u0027, \u0027keystone\u0027, \u00270.0.0.0\u0027, \u0027public\u0027, \u0027wsgi-start\u0027, \u0027{\"info\": {\"host\": \"centos7-base\", \"request\": {\"path\": \"/v3\", \"scheme\": \"http\", \"method\": \"GET\", \"query\": \"\"}}}\u0027)\n(Pdb) event[\"info\"]\n*** sqlalchemy.exc.NoSuchColumnError: \"Could not locate column in row for column \u0027info\u0027\"\n(Pdb) event.keys()\n[\u0027id\u0027, \u0027timestamp\u0027, \u0027base_id\u0027, \u0027parent_id\u0027, \u0027trace_id\u0027, \u0027project\u0027, \u0027host\u0027, \u0027service\u0027, \u0027name\u0027, \u0027data\u0027]\n(Pdb) event[\"host\"]\n\u00270.0.0.0\u0027\n\n\nShoudn\u0027t it be:\n\u003e event[\"host\"]","commit_id":"86e4e077dc78e44a95dbbaa56fe1eff3e9a6642b"},{"author":{"_account_id":5950,"name":"Ilya Shakhat","email":"shakhat@gmail.com","username":"shakhat"},"change_message_id":"a806faca566943faab1105874ce7da8c41527055","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                depth \u003d parent_event.get(\"depth_value\", 0) + 1"},{"line_number":134,"context_line":"            e[\"depth_value\"] \u003d depth"},{"line_number":135,"context_line":"            e[\"depth\"] \u003d \"*\" * depth"},{"line_number":136,"context_line":"            e[\"host\"] \u003d e[\"info\"].get(\"host\")"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            def _get_event_details(info):"},{"line_number":139,"context_line":"                details \u003d \"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_f9dc9547","line":136,"range":{"start_line":136,"start_character":12,"end_line":136,"end_character":45},"in_reply_to":"ffb9cba7_813d89c5","updated":"2019-05-06 15:46:59.000000000","message":"It looks like \"host\" is stored differently in sqlalchemy driver and refactoring in https://review.opendev.org/#/c/650890/2 broke it.\n\nhttps://github.com/openstack/osprofiler/blob/master/osprofiler/drivers/sqlalchemy_driver.py#L121\nvs\nhttps://github.com/openstack/osprofiler/blob/master/osprofiler/drivers/redis_driver.py#L145","commit_id":"86e4e077dc78e44a95dbbaa56fe1eff3e9a6642b"},{"author":{"_account_id":5950,"name":"Ilya Shakhat","email":"shakhat@gmail.com","username":"shakhat"},"change_message_id":"cb92f63ed24f532d6dff6ceb1812645edbc47711","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                details \u003d \"\""},{"line_number":140,"context_line":"                if \"db\" in info:"},{"line_number":141,"context_line":"                    details \u003d info[\"db\"][\"statement\"].replace(\"\\n\", \"\")"},{"line_number":142,"context_line":"                    if len(details) \u003e 60:"},{"line_number":143,"context_line":"                        details \u003d (details[:30] + \"...\" + details[-30:])"},{"line_number":144,"context_line":"                elif \"request\" in info:"},{"line_number":145,"context_line":"                    details \u003d \"{} {}\".format(info[\"request\"][\"method\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fce034c_57033f43","line":142,"updated":"2019-04-12 15:48:49.000000000","message":"details need to be trimmed for all cases, not only for db","commit_id":"86e4e077dc78e44a95dbbaa56fe1eff3e9a6642b"}]}
