)]}'
{"keystoneauth1/session.py":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"e3f02f3580a0ad16e03123981ff650123a8cde62","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        self.app_version \u003d app_version"},{"line_number":243,"context_line":"        self.additional_user_agent \u003d additional_user_agent or []"},{"line_number":244,"context_line":"        self._determined_user_agent \u003d None"},{"line_number":245,"context_line":"        self.service_name \u003d None"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        if timeout is not None:"},{"line_number":248,"context_line":"            self.timeout \u003d float(timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_cb3e728a","line":245,"range":{"start_line":245,"start_character":28,"end_line":245,"end_character":32},"updated":"2016-11-02 11:00:58.000000000","message":"this is not a variable that makes sense here. This is a per-request variable.","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1708450e6bc4cb19e8f5e5ba5e0b1086417912e3","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        self.app_version \u003d app_version"},{"line_number":243,"context_line":"        self.additional_user_agent \u003d additional_user_agent or []"},{"line_number":244,"context_line":"        self._determined_user_agent \u003d None"},{"line_number":245,"context_line":"        self.service_name \u003d None"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        if timeout is not None:"},{"line_number":248,"context_line":"            self.timeout \u003d float(timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_6881c1fa","line":245,"range":{"start_line":245,"start_character":28,"end_line":245,"end_character":32},"in_reply_to":"ba5da102_cb3e728a","updated":"2016-11-03 07:36:31.000000000","message":"I will fix it in new PS","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"e3f02f3580a0ad16e03123981ff650123a8cde62","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            string_parts.append(\u0027[%s]\u0027 % status_code)"},{"line_number":366,"context_line":"        if headers:"},{"line_number":367,"context_line":"            for header in six.iteritems(headers):"},{"line_number":368,"context_line":"                string_parts.append(\u0027%s: %s\u0027 % self._process_header(header))"},{"line_number":369,"context_line":"        if text:"},{"line_number":370,"context_line":"            string_parts.append(\u0027\\nRESP BODY: %s\\n\u0027 % text)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_2bc36e8a","line":368,"range":{"start_line":368,"start_character":47,"end_line":368,"end_character":51},"updated":"2016-11-02 11:00:58.000000000","message":"isn\u0027t this already going to be printed in the headers?","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1708450e6bc4cb19e8f5e5ba5e0b1086417912e3","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            string_parts.append(\u0027[%s]\u0027 % status_code)"},{"line_number":366,"context_line":"        if headers:"},{"line_number":367,"context_line":"            for header in six.iteritems(headers):"},{"line_number":368,"context_line":"                string_parts.append(\u0027%s: %s\u0027 % self._process_header(header))"},{"line_number":369,"context_line":"        if text:"},{"line_number":370,"context_line":"            string_parts.append(\u0027\\nRESP BODY: %s\\n\u0027 % text)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_6825415a","line":368,"range":{"start_line":368,"start_character":47,"end_line":368,"end_character":51},"in_reply_to":"ba5da102_2bc36e8a","updated":"2016-11-03 07:36:31.000000000","message":"Hi Jamie,\n\nIt will definitely log request-id here but we will not able to identify that this request-id belongs to which service and for what kind of operation it is used. For example when we call nova \u0027list\u0027 api, then internally it calls network(neutron) to get security group information. In this case the headers will be logged as below:\n\n\n2016-11-03 12:31:02.098 DEBUG keystoneauth.session [req-35002bae-61ba-422d-a8e9-2cad2970165f admin admin] RESP: [200] Content-Type: application/json Content-Length: 2374 X-Openstack-Request-Id: req-ecf39768-fe95-405c-b360-51dcfbaf1ef9 Date: Thu, 03 Nov 2016 07:01:02 GMT Connection: keep-alive\n\n\nWith my changes this information will be logged as below from which we can easily identify the request-id of the callee and for which service this request is made. This is helpful for operator to trace this request easily.\n\n\n2016-11-03 12:31:02.099 DEBUG keystoneauth.session [req-35002bae-61ba-422d-a8e9-2cad2970165f admin admin] GET call to network for http://10.232.48.201:9696/v2.0/security-groups.json?id\u003d040cc729-9086-4f41-8977-acb4ef71c7de used request id req-ecf39768-fe95-405c-b360-51dcfbaf1ef9 from (pid\u003d18962) _http_log_response /usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py:386","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"e3f02f3580a0ad16e03123981ff650123a8cde62","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        if endpoint_filter:"},{"line_number":480,"context_line":"            self.service_name \u003d endpoint_filter.get(\u0027service_name\u0027)"},{"line_number":481,"context_line":"            if not self.service_name:"},{"line_number":482,"context_line":"                self.service_name \u003d endpoint_filter.get(\u0027service_type\u0027)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        headers \u003d kwargs.setdefault(\u0027headers\u0027, dict())"},{"line_number":485,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_8bd47a20","line":482,"updated":"2016-11-02 11:00:58.000000000","message":"don\u0027t save variables on the object you only intend to use once - later in the function. Amongst a whole bunch of other problems it\u0027s not thread safe.","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1708450e6bc4cb19e8f5e5ba5e0b1086417912e3","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        if endpoint_filter:"},{"line_number":480,"context_line":"            self.service_name \u003d endpoint_filter.get(\u0027service_name\u0027)"},{"line_number":481,"context_line":"            if not self.service_name:"},{"line_number":482,"context_line":"                self.service_name \u003d endpoint_filter.get(\u0027service_type\u0027)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        headers \u003d kwargs.setdefault(\u0027headers\u0027, dict())"},{"line_number":485,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_28a429b8","line":482,"in_reply_to":"ba5da102_8bd47a20","updated":"2016-11-03 07:36:31.000000000","message":"I will fix it in new PS.","commit_id":"efd9fa0905781b981a6bf1ee7096c525307376e5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44893882514852f414e02c1844262e4c64a7f41b","unresolved":false,"context_lines":[{"line_number":592,"context_line":"        resp \u003d send(**kwargs)"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        # log callee and caller request-id for each api call"},{"line_number":595,"context_line":"        if log:"},{"line_number":596,"context_line":"            # service_name should be fetched from endpoint_filter if it is not"},{"line_number":597,"context_line":"            # present then use service_type as service_name."},{"line_number":598,"context_line":"            service_name \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_eed0f9cb","line":595,"updated":"2016-12-08 20:57:25.000000000","message":"I\u0027d be nice to see some tests for this behavior.\n\nhttps://github.com/openstack/keystoneauth/blob/master/keystoneauth1/tests/unit/test_session.py","commit_id":"3b2c0016f0f958ef5d07538238654d6929f82802"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"47c98118760934ca8950dcf63b6d9f30d9e8cd68","unresolved":false,"context_lines":[{"line_number":592,"context_line":"        resp \u003d send(**kwargs)"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        # log callee and caller request-id for each api call"},{"line_number":595,"context_line":"        if log:"},{"line_number":596,"context_line":"            # service_name should be fetched from endpoint_filter if it is not"},{"line_number":597,"context_line":"            # present then use service_type as service_name."},{"line_number":598,"context_line":"            service_name \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_2a857006","line":595,"in_reply_to":"3a71b18c_eed0f9cb","updated":"2016-12-20 12:05:03.000000000","message":"++","commit_id":"3b2c0016f0f958ef5d07538238654d6929f82802"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44893882514852f414e02c1844262e4c64a7f41b","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                    service_name \u003d endpoint_filter.get(\u0027service_type\u0027)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"            # Nova uses \u0027x-compute-request-id\u0027 and other services like"},{"line_number":605,"context_line":"            # Glance, Cinder etc are using \u0027x-openstack-request-id\u0027 to store"},{"line_number":606,"context_line":"            # request-id in the header"},{"line_number":607,"context_line":"            request_id \u003d (resp.headers.get(\u0027x-openstack-request-id\u0027) or"},{"line_number":608,"context_line":"                          resp.headers.get(\u0027x-compute-request-id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_8e722510","line":605,"updated":"2016-12-08 20:57:25.000000000","message":"Is there a reason why we don\u0027t standardize on something? If there is we should elaborate on it here.","commit_id":"3b2c0016f0f958ef5d07538238654d6929f82802"}]}
