)]}'
{"swift/common/middleware/proxy_logging.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f678c5a6712ca26afc31183cf6774274a2e829fb","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def __init__(self, app, conf, logger\u003dNone):"},{"line_number":93,"context_line":"        self.app \u003d app"},{"line_number":94,"context_line":"        self.pid \u003d os.getpid()"},{"line_number":95,"context_line":"        self.log_formatter \u003d LogStringFormatter(default\u003d\u0027-\u0027, quote\u003dTrue)"},{"line_number":96,"context_line":"        self.log_msg_template \u003d conf.get("},{"line_number":97,"context_line":"            \u0027log_msg_template\u0027, ("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_384d9c70","line":94,"updated":"2020-01-27 21:32:30.000000000","message":"So when the proxy spawns off some workers... this\u0027ll be the child pid, yeah? I\u0027m not actually sure which one I\u0027d find more useful, personally... probably this way, now that we have https://review.opendev.org/#/c/691423/","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"5d75cf41ae24c5506e5568910048b5f0817eddba","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def __init__(self, app, conf, logger\u003dNone):"},{"line_number":93,"context_line":"        self.app \u003d app"},{"line_number":94,"context_line":"        self.pid \u003d os.getpid()"},{"line_number":95,"context_line":"        self.log_formatter \u003d LogStringFormatter(default\u003d\u0027-\u0027, quote\u003dTrue)"},{"line_number":96,"context_line":"        self.log_msg_template \u003d conf.get("},{"line_number":97,"context_line":"            \u0027log_msg_template\u0027, ("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4733c9f7","line":94,"in_reply_to":"3fa7e38b_384d9c70","updated":"2020-01-28 17:03:57.000000000","message":"Yes, it\u0027s the child PID. I find it more useful than the parent PID (to know which process handled that request and corellate with something else)","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f678c5a6712ca26afc31183cf6774274a2e829fb","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        return value"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def log_request(self, req, status_int, bytes_received, bytes_sent,"},{"line_number":200,"context_line":"                    start_time, end_time, resp_headers\u003dNone, ttfb\u003d0):"},{"line_number":201,"context_line":"        \"\"\""},{"line_number":202,"context_line":"        Log a request."},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_187300b6","line":200,"range":{"start_line":200,"start_character":61,"end_line":200,"end_character":67},"updated":"2020-01-27 21:32:30.000000000","message":"Can we make this required?","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"5d75cf41ae24c5506e5568910048b5f0817eddba","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        return value"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def log_request(self, req, status_int, bytes_received, bytes_sent,"},{"line_number":200,"context_line":"                    start_time, end_time, resp_headers\u003dNone, ttfb\u003d0):"},{"line_number":201,"context_line":"        \"\"\""},{"line_number":202,"context_line":"        Log a request."},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e72d1590","line":200,"range":{"start_line":200,"start_character":61,"end_line":200,"end_character":67},"in_reply_to":"3fa7e38b_187300b6","updated":"2020-01-28 17:03:57.000000000","message":"Will do.","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f678c5a6712ca26afc31183cf6774274a2e829fb","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                metric_name \u003d self.statsd_metric_name(req, status_int, method)"},{"line_number":391,"context_line":"                metric_name_policy \u003d self.statsd_metric_name_policy("},{"line_number":392,"context_line":"                    req, status_int, method, policy_index)"},{"line_number":393,"context_line":"                ttfb \u003d time.time() - start_time"},{"line_number":394,"context_line":"                if metric_name:"},{"line_number":395,"context_line":"                    self.access_logger.timing("},{"line_number":396,"context_line":"                        metric_name + \u0027.first-byte.timing\u0027, ttfb * 1000)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_38603ca4","line":393,"updated":"2020-01-27 21:32:30.000000000","message":"Why only measure this on GET? I guess I can understand wanting to filter what we emit to statsd, but for logging...","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"5d75cf41ae24c5506e5568910048b5f0817eddba","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                metric_name \u003d self.statsd_metric_name(req, status_int, method)"},{"line_number":391,"context_line":"                metric_name_policy \u003d self.statsd_metric_name_policy("},{"line_number":392,"context_line":"                    req, status_int, method, policy_index)"},{"line_number":393,"context_line":"                ttfb \u003d time.time() - start_time"},{"line_number":394,"context_line":"                if metric_name:"},{"line_number":395,"context_line":"                    self.access_logger.timing("},{"line_number":396,"context_line":"                        metric_name + \u0027.first-byte.timing\u0027, ttfb * 1000)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a772bdae","line":393,"in_reply_to":"3fa7e38b_38603ca4","updated":"2020-01-28 17:03:57.000000000","message":"on HEAD/DELETE/POST, it would be the request_time field so no added value. On PUT it would include the upload time, which is not really useful. I don\u0027t think we can get the PUT-ready state in proxy-logging?","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"28c7d67521ec7c33fd0f8cae2ea0f43f913d15d9","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                metric_name \u003d self.statsd_metric_name(req, status_int, method)"},{"line_number":391,"context_line":"                metric_name_policy \u003d self.statsd_metric_name_policy("},{"line_number":392,"context_line":"                    req, status_int, method, policy_index)"},{"line_number":393,"context_line":"                ttfb \u003d time.time() - start_time"},{"line_number":394,"context_line":"                if metric_name:"},{"line_number":395,"context_line":"                    self.access_logger.timing("},{"line_number":396,"context_line":"                        metric_name + \u0027.first-byte.timing\u0027, ttfb * 1000)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_076b9153","line":393,"in_reply_to":"3fa7e38b_a772bdae","updated":"2020-01-28 17:21:46.000000000","message":"OK, I think that starts to make sense -- and explains why zero was a sensible default: should be easier to filter out when aggregating stats.\n\nIf you\u0027re interested in a PUT-ready timing... might be able to wrap wsgi.input and track the time from request received to first read of the request body. *shrug*","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f678c5a6712ca26afc31183cf6774274a2e829fb","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            status_int \u003d status_int_for_logging(start_status\u003d500)"},{"line_number":428,"context_line":"            self.log_request("},{"line_number":429,"context_line":"                req, status_int, input_proxy.bytes_received, 0, start_time,"},{"line_number":430,"context_line":"                time.time())"},{"line_number":431,"context_line":"            raise"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            return iter_response(iterable)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_3563651b","line":430,"updated":"2020-01-27 21:32:30.000000000","message":"No ttfb here? I\u0027d think\n\n time.time() - start_time\n\nshould work well...","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"5d75cf41ae24c5506e5568910048b5f0817eddba","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            status_int \u003d status_int_for_logging(start_status\u003d500)"},{"line_number":428,"context_line":"            self.log_request("},{"line_number":429,"context_line":"                req, status_int, input_proxy.bytes_received, 0, start_time,"},{"line_number":430,"context_line":"                time.time())"},{"line_number":431,"context_line":"            raise"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            return iter_response(iterable)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_075711f7","line":430,"in_reply_to":"3fa7e38b_3563651b","updated":"2020-01-28 17:03:57.000000000","message":"Yes, there is something to do here. Will check that.","commit_id":"d8821c75bd79c2b95ab7635b58754d059be2079b"}]}
