)]}'
{"oslo/messaging/profiler.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d1407332c617183fda84f8c921deb0f74d60ad63","unresolved":false,"context_lines":[{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    from osprofiler import profiler"},{"line_number":17,"context_line":"except:"},{"line_number":18,"context_line":"    profiler \u003d None"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"TRACE_INFO \u003d \"trace_info\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_3ef9ff4d","line":18,"updated":"2014-07-01 00:44:39.000000000","message":"except ImportError:\n\nThat way u aren\u0027t masking a bunch of other errors.","commit_id":"ceb0faf5f150c30f785093e497b39282a81e1246"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"0ccb714bdc45ec78784c51528c75b4988232486e","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"TRACE_INFO \u003d \"trace_info\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def lazy_trace(f):"},{"line_number":25,"context_line":"    \"\"\"Add lazy OSproifler trace point."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_feace737","line":23,"updated":"2014-07-01 00:46:01.000000000","message":"Use functools.wraps(f), then u won\u0027t be losing the identity of the original function.\n\nWhen u don\u0027t use it you lose various useful things (__name__ for example).","commit_id":"ceb0faf5f150c30f785093e497b39282a81e1246"}],"oslo/messaging/rpc/client.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"70fcc47cc6fb26a7741c6bbbee732b2ec57a10ba","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            msg[\u0027trace_info\u0027] \u003d {"},{"line_number":116,"context_line":"                \u0027base_id\u0027: p.get_base_id(),"},{"line_number":117,"context_line":"                \u0027parent_id\u0027: p.get_id(),"},{"line_number":118,"context_line":"                \u0027hmac_key\u0027: p.hmac_key"},{"line_number":119,"context_line":"            }"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_274e58c2","line":118,"updated":"2014-06-30 07:03:18.000000000","message":"This sort of stuff belongs in the request context, I think\n\nI wonder could a RequestContextSerializer be a good way to add this metadata?","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"593138cb20ade08f0b5a47f8d2e1fb192ff716e4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            msg[\u0027trace_info\u0027] \u003d {"},{"line_number":116,"context_line":"                \u0027base_id\u0027: p.get_base_id(),"},{"line_number":117,"context_line":"                \u0027parent_id\u0027: p.get_id(),"},{"line_number":118,"context_line":"                \u0027hmac_key\u0027: p.hmac_key"},{"line_number":119,"context_line":"            }"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_eada65e8","line":118,"in_reply_to":"dab895d6_274e58c2","updated":"2014-06-30 07:42:39.000000000","message":"Hm where that code belongs? I mean RequestContextSerializer?","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0cf19a4b101808522452badb2f01ce5d966e1a78","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            msg[\u0027trace_info\u0027] \u003d {"},{"line_number":116,"context_line":"                \u0027base_id\u0027: p.get_base_id(),"},{"line_number":117,"context_line":"                \u0027parent_id\u0027: p.get_id(),"},{"line_number":118,"context_line":"                \u0027hmac_key\u0027: p.hmac_key"},{"line_number":119,"context_line":"            }"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b00ffee0","line":118,"in_reply_to":"dab895d6_2dc4773f","updated":"2014-06-30 23:41:37.000000000","message":"So I tried to move this to context, but I have issue. \n\nIf we are adding this data during serialize_context() we will change context data. After we get it on another side, we need to get rid of it from context, but putting cleanup in deserialize() won\u0027t work, cause I need this data.. So \n\nI\u0027ll need to cleanup it by hand which is bad solution. \n\nAny thoughts?","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"9061ca3ad6e41fba2c56e997f0fb85b3be79de47","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            msg[\u0027trace_info\u0027] \u003d {"},{"line_number":116,"context_line":"                \u0027base_id\u0027: p.get_base_id(),"},{"line_number":117,"context_line":"                \u0027parent_id\u0027: p.get_id(),"},{"line_number":118,"context_line":"                \u0027hmac_key\u0027: p.hmac_key"},{"line_number":119,"context_line":"            }"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_2dc4773f","line":118,"in_reply_to":"dab895d6_6d74af9c","updated":"2014-06-30 08:07:56.000000000","message":"Ah so you mean just to use context instead of msg to transport this stuff. \n\nOk will try to do my best.\n\nBut I\u0027ll start with moving first patch to osprofiler lib","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"de7197f20740e3a6b5dc61c1b5829e36358b78e9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            msg[\u0027trace_info\u0027] \u003d {"},{"line_number":116,"context_line":"                \u0027base_id\u0027: p.get_base_id(),"},{"line_number":117,"context_line":"                \u0027parent_id\u0027: p.get_id(),"},{"line_number":118,"context_line":"                \u0027hmac_key\u0027: p.hmac_key"},{"line_number":119,"context_line":"            }"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_6d74af9c","line":118,"in_reply_to":"dab895d6_eada65e8","updated":"2014-06-30 07:57:44.000000000","message":"osprofiler could supply a RequestContextSerializer which adds trade_info in serialize_context()","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"}],"oslo/messaging/rpc/dispatcher.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"70fcc47cc6fb26a7741c6bbbee732b2ec57a10ba","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    })"},{"line_number":187,"context_line":"                    return self._do_dispatch(endpoint, method, ctxt, args)"},{"line_number":188,"context_line":"                finally:"},{"line_number":189,"context_line":"                    profiler.stop()"},{"line_number":190,"context_line":"                    localcontext.clear_local_context()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            found_compatible \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_87c1e4e6","line":189,"updated":"2014-06-30 07:03:18.000000000","message":"I could imagine adding a pre/post dispatch hook API here for osprofiler to allow osprofiler integration","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"de7197f20740e3a6b5dc61c1b5829e36358b78e9","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    })"},{"line_number":187,"context_line":"                    return self._do_dispatch(endpoint, method, ctxt, args)"},{"line_number":188,"context_line":"                finally:"},{"line_number":189,"context_line":"                    profiler.stop()"},{"line_number":190,"context_line":"                    localcontext.clear_local_context()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            found_compatible \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_8d0ae3d0","line":189,"in_reply_to":"dab895d6_2a81bd8f","updated":"2014-06-30 07:57:44.000000000","message":"Yes, osprofiler endpoint method decorators would work e.g.\n\n  @osprofiler.rpcmethod\n  def ping(self, ctxt):\n      ...\n\nor we could have:\n\n  server \u003d messaging.get_rpc_server(..., dispatch_hook\u003dosprofiler.rpc_dispatch_hook)\n\nand the hook could be e.g.\n\n  @contextlib.contextmanager\n  rpc_dispatch_hook(target, endpoint, method, ctxt, args):\n      profiler.start(...)\n      yield\n      profiler.stop()\n\nnote also that the set_local_context() stuff could use the same hook and we could require hooks to chain\n\nJust two quick ideas ...","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"593138cb20ade08f0b5a47f8d2e1fb192ff716e4","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    })"},{"line_number":187,"context_line":"                    return self._do_dispatch(endpoint, method, ctxt, args)"},{"line_number":188,"context_line":"                finally:"},{"line_number":189,"context_line":"                    profiler.stop()"},{"line_number":190,"context_line":"                    localcontext.clear_local_context()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            found_compatible \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab895d6_2a81bd8f","line":189,"in_reply_to":"dab895d6_87c1e4e6","updated":"2014-06-30 07:42:39.000000000","message":"e.g. decorator?","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0cf19a4b101808522452badb2f01ce5d966e1a78","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    })"},{"line_number":187,"context_line":"                    return self._do_dispatch(endpoint, method, ctxt, args)"},{"line_number":188,"context_line":"                finally:"},{"line_number":189,"context_line":"                    profiler.stop()"},{"line_number":190,"context_line":"                    localcontext.clear_local_context()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            found_compatible \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b0445e75","line":189,"in_reply_to":"dab895d6_8d0ae3d0","updated":"2014-06-30 23:41:37.000000000","message":"I didn\u0027t see argument in get_rpc_server for dispatch_hook...\n\ndef get_rpc_server(transport, target, endpoints,\n                   executor\u003d\u0027blocking\u0027, serializer\u003dNone):\n\nhttps://github.com/openstack/oslo.messaging/blob/master/oslo/messaging/rpc/server.py#L100\n\nMaybe I am missing something...","commit_id":"a4d5eda193b72f3a9b25cb5924755d15c0143d17"}]}
