)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1a3865a0fe81f065c45f3afec5d5b1b54affcf54","unresolved":false,"context_lines":[{"line_number":7,"context_line":"LOG the Request ID\u0027s in Ironic API service"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently generated request_id\u0027s per API call are not logged,"},{"line_number":10,"context_line":"making it difficult for debugging. This commit logs the request-id\u0027s"},{"line_number":11,"context_line":"generated per API request. This commit also appends the request-id"},{"line_number":12,"context_line":"in the response header, to easy to track from other modules (eg:nova)"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_841dfebf","line":10,"updated":"2015-08-12 10:20:56.000000000","message":"request-id logging is not present in the patch.","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2332f3df05fbbedbddf63f2eeaa56f6589a47290","unresolved":false,"context_lines":[{"line_number":7,"context_line":"LOG the Request ID\u0027s in Ironic API service"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently generated request_id\u0027s per API call are not logged,"},{"line_number":10,"context_line":"making it difficult for debugging. This commit logs the request-id\u0027s"},{"line_number":11,"context_line":"generated per API request. This commit also appends the request-id"},{"line_number":12,"context_line":"in the response header, to easy to track from other modules (eg:nova)"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_aae1e12b","line":10,"in_reply_to":"1a4dcd0f_841dfebf","updated":"2015-08-14 05:58:48.000000000","message":"Yuriy, it will be taken care by https://review.openstack.org/#/c/210293/3/ironic/api/hooks.py#99-100, as request-id will be appended automatically as it will be generated when the Requestcontext is created.\n\nSample LOG message will be -\n\n 2015-08-12 16:23:33.435 DEBUG ironic.api.hooks [req-9cace25d-dc8d-4892-852a-f04f8d849e75 None None] GET http://10.0.4.41:6385/v1/nodes/detail from (pid\u003d29978) before /opt/stack/ironic/ironic/api/hooks.py:100","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"}],"ironic/api/hooks.py":[{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"a02e0b7ae5ac9aa2c7da92b6dc172e437c0f4bbc","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def before(self, state):"},{"line_number":34,"context_line":"        state.request.cfg \u003d cfg.CONF"},{"line_number":35,"context_line":"        "},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class DBHook(hooks.PecanHook):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_00587655","line":35,"updated":"2015-08-10 10:11:53.000000000","message":"nit:extra spaces?","commit_id":"3efeddc7e585f97e6948d9923324c876fecc2a4b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"caa7489934652abe61a2b1c953e884d004f76610","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            \u0027domain_name\u0027: headers.get(\u0027X-User-Domain-Name\u0027),"},{"line_number":82,"context_line":"            \u0027auth_token\u0027: auth_token,"},{"line_number":83,"context_line":"            \u0027roles\u0027: headers.get(\u0027X-Roles\u0027, \u0027\u0027).split(\u0027,\u0027),"},{"line_number":84,"context_line":"            # Append the request_id if it is present"},{"line_number":85,"context_line":"            \u0027request_id\u0027: headers.get(\u0027X-Openstack-Request-ID\u0027)"},{"line_number":86,"context_line":"        }"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_ae90704f","line":84,"updated":"2015-08-10 21:19:40.000000000","message":"nit: I am a big fan of comments, but this seems redundant","commit_id":"3efeddc7e585f97e6948d9923324c876fecc2a4b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"caa7489934652abe61a2b1c953e884d004f76610","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            is_public_api\u003dis_public_api,"},{"line_number":99,"context_line":"            show_password\u003dshow_password,"},{"line_number":100,"context_line":"            **creds)"},{"line_number":101,"context_line":"        # LOG the request with the generated request-id"},{"line_number":102,"context_line":"        LOG.debug(\"Received Request - %(method)s %(path)s \","},{"line_number":103,"context_line":"                  {\u0027method\u0027: req.method, \u0027path\u0027: req.path_url})"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_2e8b0020","line":101,"updated":"2015-08-10 21:19:40.000000000","message":"nit: I am a big fan of comments, but this seems redundant\n\nAlso this comment seems wrong.  It has the method and path_url but does not have the request-id.","commit_id":"3efeddc7e585f97e6948d9923324c876fecc2a4b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5718650d1d6591f87acc334f7724a80414465039","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            is_public_api\u003dis_public_api,"},{"line_number":97,"context_line":"            show_password\u003dshow_password,"},{"line_number":98,"context_line":"            **creds)"},{"line_number":99,"context_line":"        LOG.debug((\"%(method)s %(path)s\"), {\u0027method\u0027: req.method,"},{"line_number":100,"context_line":"                                            \u0027path\u0027: req.path_url})"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def after(self, state):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_6563a342","line":99,"updated":"2015-08-14 05:38:11.000000000","message":"What will this log message look like?  It seems like a little more contextual information might be useful.","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2332f3df05fbbedbddf63f2eeaa56f6589a47290","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            is_public_api\u003dis_public_api,"},{"line_number":97,"context_line":"            show_password\u003dshow_password,"},{"line_number":98,"context_line":"            **creds)"},{"line_number":99,"context_line":"        LOG.debug((\"%(method)s %(path)s\"), {\u0027method\u0027: req.method,"},{"line_number":100,"context_line":"                                            \u0027path\u0027: req.path_url})"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def after(self, state):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0542df68","line":99,"in_reply_to":"1a4dcd0f_6563a342","updated":"2015-08-14 05:58:48.000000000","message":"Sample LOG message will be -\n 2015-08-12 16:23:33.435 DEBUG ironic.api.hooks [req-9cace25d-dc8d-4892-852a-f04f8d849e75 None None] GET http://10.0.4.41:6385/v1/nodes/detail from (pid\u003d29978) before /opt/stack/ironic/api/hooks.py","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1a3865a0fe81f065c45f3afec5d5b1b54affcf54","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # trace back the request."},{"line_number":105,"context_line":"        resp \u003d state.response"},{"line_number":106,"context_line":"        req \u003d state.request"},{"line_number":107,"context_line":"        if hasattr(req.context, \u0027request_id\u0027):"},{"line_number":108,"context_line":"            resp.headers[\u0027x-openstack-request-id\u0027] \u003d req.context.request_id"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_849c1e6b","line":107,"updated":"2015-08-12 10:20:56.000000000","message":"\u0027request_id\u0027 attribute always present in context https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py#L64-L66 And no unit test for this code.","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4128ef6aa1a4874c42ab98b4978dcafcf7cb18ee","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # trace back the request."},{"line_number":105,"context_line":"        resp \u003d state.response"},{"line_number":106,"context_line":"        req \u003d state.request"},{"line_number":107,"context_line":"        if hasattr(req.context, \u0027request_id\u0027):"},{"line_number":108,"context_line":"            resp.headers[\u0027x-openstack-request-id\u0027] \u003d req.context.request_id"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_e475e2ca","line":107,"in_reply_to":"1a4dcd0f_849c1e6b","updated":"2015-08-12 10:26:15.000000000","message":"+1","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2332f3df05fbbedbddf63f2eeaa56f6589a47290","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # trace back the request."},{"line_number":105,"context_line":"        resp \u003d state.response"},{"line_number":106,"context_line":"        req \u003d state.request"},{"line_number":107,"context_line":"        if hasattr(req.context, \u0027request_id\u0027):"},{"line_number":108,"context_line":"            resp.headers[\u0027x-openstack-request-id\u0027] \u003d req.context.request_id"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_e0bfa1fa","line":107,"in_reply_to":"1a4dcd0f_e475e2ca","updated":"2015-08-14 05:58:48.000000000","message":"Actually not needed, but pecan test env is failing because req.context is set to dict by default not a context object and causing the failure.\nhttp://paste.openstack.org/show/413484/\n\nNot sure, if we can change the pecan test env\nSo, added this attr to make sure req.context is Context Object not dict.","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4128ef6aa1a4874c42ab98b4978dcafcf7cb18ee","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        resp \u003d state.response"},{"line_number":106,"context_line":"        req \u003d state.request"},{"line_number":107,"context_line":"        if hasattr(req.context, \u0027request_id\u0027):"},{"line_number":108,"context_line":"            resp.headers[\u0027x-openstack-request-id\u0027] \u003d req.context.request_id"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class RPCHook(hooks.PecanHook):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_44329611","line":108,"updated":"2015-08-12 10:26:15.000000000","message":"Does the case matters here?\n\n\u0027x-openstack-request-id\u0027 Vs \u0027X-OpenStack-Request-ID\u0027","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2332f3df05fbbedbddf63f2eeaa56f6589a47290","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        resp \u003d state.response"},{"line_number":106,"context_line":"        req \u003d state.request"},{"line_number":107,"context_line":"        if hasattr(req.context, \u0027request_id\u0027):"},{"line_number":108,"context_line":"            resp.headers[\u0027x-openstack-request-id\u0027] \u003d req.context.request_id"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class RPCHook(hooks.PecanHook):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0cae8c81","line":108,"in_reply_to":"1a4dcd0f_44329611","updated":"2015-08-14 05:58:48.000000000","message":"Actually took the reference from other projects(glance), In the response headers it is appended as \u0027x-openstack-request-id\u0027 , and when passing in request, it is X-OpenStack-Request-ID on par with other headers. It\u0027s consumed in the same way everywhere","commit_id":"72393abf2c2b3a58f0a8e484ae1f98119d9af30a"}]}
