)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2020-09-04 14:57:31 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"proxy: Add metrics for short requests and responses"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I7a643ae41f41bb56dd20ca804fa478c295e4441d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f560f44_bc2c0902","line":8,"updated":"2020-09-15 18:21:16.000000000","message":"it\u0027d be helpful to describe the metrics here","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"}],"swift/common/middleware/proxy_logging.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"},{"line_number":286,"context_line":"        if stat_type is None:"},{"line_number":287,"context_line":"            return"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        # Log timing, bytes-transferred, etc. data to StatsD"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_c715aa9d","line":287,"updated":"2020-09-15 18:21:16.000000000","message":"a lot of the unit tests for this module seem to return here, i\u0027m not sure how good our coverage is\n\n\tdiff --git a/test/unit/common/middleware/test_proxy_logging.py b/test/unit/common/middleware/test_proxy_logging.py\n\tindex 494eec92a..aaeddeac9 100644\n\t--- a/test/unit/common/middleware/test_proxy_logging.py\n\t+++ b/test/unit/common/middleware/test_proxy_logging.py\n\t@@ -673,7 +673,7 @@ class TestProxyLogging(unittest.TestCase):\n\t\t app \u003d proxy_logging.ProxyLoggingMiddleware(\n\t\t     FakeApp([\u0027some\u0027, \u0027stuff\u0027]), {})\n\t\t app.access_logger \u003d FakeLogger()\n\t-        req \u003d Request.blank(\u0027/\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027})\n\t+        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027})\n\t\t resp \u003d app(req.environ, start_response)\n\t\t # read first chunk\n\t\t next(resp)","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        except (ValueError, AttributeError):"},{"line_number":294,"context_line":"            request_length \u003d None"},{"line_number":295,"context_line":"        if request_length is not None and bytes_received \u003c request_length:"},{"line_number":296,"context_line":"            self.access_logger.increment(stat_type + \u0027.short-request\u0027)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if \u0027Content-Length\u0027 in resp_headers:"},{"line_number":299,"context_line":"            bytes_expected \u003d int(resp_headers[\u0027Content-Length\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_dcb45dd7","line":296,"updated":"2020-09-15 18:21:16.000000000","message":"this is a guess a PUT where the client doesn\u0027t send all the bytes the promised?","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        else:"},{"line_number":301,"context_line":"            bytes_expected \u003d bytes_sent"},{"line_number":302,"context_line":"        if status_int !\u003d 499 and method !\u003d \u0027HEAD\u0027 and \\"},{"line_number":303,"context_line":"                bytes_sent \u003c bytes_expected:"},{"line_number":304,"context_line":"            self.access_logger.increment(stat_type + \u0027.short-response\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        def update_metrics(metric_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5c9fad50","line":303,"updated":"2020-09-15 18:21:16.000000000","message":"i guess the only thing that bugs me about this is that anytime we\u0027re in this state we should already be logging a 499\n\nso the idea is this metric a belts and braces check to indicate \"there\u0027s a bug\" in our pipeline somewhere?","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                    if metric_name_policy:"},{"line_number":418,"context_line":"                        self.access_logger.timing("},{"line_number":419,"context_line":"                            metric_name_policy + \u0027.first-byte.timing\u0027,"},{"line_number":420,"context_line":"                            ttfb * 1000)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"            bytes_sent \u003d 0"},{"line_number":423,"context_line":"            client_disconnect \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fc01616c","line":420,"updated":"2020-09-15 18:21:16.000000000","message":"is this little stat_type/req refactor like some kind of drive-by?","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b811729e39237cc698db41153480216de80d7559","unresolved":false,"context_lines":[{"line_number":432,"context_line":"                client_disconnect \u003d True"},{"line_number":433,"context_line":"                raise"},{"line_number":434,"context_line":"            finally:"},{"line_number":435,"context_line":"                status_int \u003d status_int_for_logging(client_disconnect)"},{"line_number":436,"context_line":"                self.log_request("},{"line_number":437,"context_line":"                    req, status_int, input_proxy.bytes_received, bytes_sent,"},{"line_number":438,"context_line":"                    start_time, time.time(), resp_headers\u003dresp_headers,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_a71eb6b8","line":435,"updated":"2020-09-15 18:21:16.000000000","message":"it seems like somewhere around *here* is where we could fix the status_int if it wasn\u0027t already 499","commit_id":"663bcc04f7df3e851d086a471854fab34ef294a9"}]}
