)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4fdb76cea8f04903d975efdbfdb241b7bdf08f82","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a90934ea_1cd84235","updated":"2022-01-27 03:00:54.000000000","message":"Based on Clay\u0027s statement, I went and had a play with proxy-logging and indeed there is a way to add request headers to the log line (see inline).\n\nSo this change may not be required at all. Seems we learn something new everyday!","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"477a2ec6bf2b824e9ac0b46fbb526a2bcc4afa58","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a7b1bb73_1f99dec1","updated":"2022-01-26 14:51:58.000000000","message":"how serious are we about this?  I thought we kind of already hate having so many logs - and especially object server logs.","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"486ccbd0ca52c2a42f1fdf9cdc68be440697f0f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8a22939f_3f170b60","updated":"2022-01-27 15:35:18.000000000","message":"i hope i didn\u0027t lead matt thinking down the wrong direction","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e8a54a5d033efd44e4f7a8dee222b6cf8179abe0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"729f3285_c8d7a20a","updated":"2022-01-25 23:57:13.000000000","message":"recheck","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"}],"swift/common/utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"477a2ec6bf2b824e9ac0b46fbb526a2bcc4afa58","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                                anonymization_salt),"},{"line_number":831,"context_line":"        \u0027status\u0027: res.status.split()[0],"},{"line_number":832,"context_line":"        \u0027content_length\u0027: res.content_length,"},{"line_number":833,"context_line":"        \u0027range\u0027: req.headers.get(\u0027range\u0027),"},{"line_number":834,"context_line":"        \u0027referer\u0027: StrAnonymizer(req.referer, anonymization_method,"},{"line_number":835,"context_line":"                                 anonymization_salt),"},{"line_number":836,"context_line":"        \u0027txn_id\u0027: req.headers.get(\u0027x-trans-id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"b1ef77e6_01ce993a","line":833,"updated":"2022-01-26 14:51:58.000000000","message":"that\u0027s *really* specific - don\u0027t we have some general system in proxy-logging for configuring headers to go out to the logs?","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"486ccbd0ca52c2a42f1fdf9cdc68be440697f0f6","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                                anonymization_salt),"},{"line_number":831,"context_line":"        \u0027status\u0027: res.status.split()[0],"},{"line_number":832,"context_line":"        \u0027content_length\u0027: res.content_length,"},{"line_number":833,"context_line":"        \u0027range\u0027: req.headers.get(\u0027range\u0027),"},{"line_number":834,"context_line":"        \u0027referer\u0027: StrAnonymizer(req.referer, anonymization_method,"},{"line_number":835,"context_line":"                                 anonymization_salt),"},{"line_number":836,"context_line":"        \u0027txn_id\u0027: req.headers.get(\u0027x-trans-id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"45e0efa9_42b55424","line":833,"in_reply_to":"28facd6b_e809b07f","updated":"2022-01-27 15:35:18.000000000","message":"well, except we don\u0027t typically have proxy-logging in our object-server pipeline (and i\u0027m not sure it would work)\n\nI was just thinking we could steal some code from proxy-logging so that in the future we could *temporarily* add logging for various headers in the object-server while debugging EC resume OR other issues.","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c553aced22659fcb452cd41c8642b916bac5bc92","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                                anonymization_salt),"},{"line_number":831,"context_line":"        \u0027status\u0027: res.status.split()[0],"},{"line_number":832,"context_line":"        \u0027content_length\u0027: res.content_length,"},{"line_number":833,"context_line":"        \u0027range\u0027: req.headers.get(\u0027range\u0027),"},{"line_number":834,"context_line":"        \u0027referer\u0027: StrAnonymizer(req.referer, anonymization_method,"},{"line_number":835,"context_line":"                                 anonymization_salt),"},{"line_number":836,"context_line":"        \u0027txn_id\u0027: req.headers.get(\u0027x-trans-id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"35fc1431_58e87df7","line":833,"in_reply_to":"45e0efa9_42b55424","updated":"2022-01-27 22:16:14.000000000","message":"Oh we want it from the object server side... I somehow missed that. Yeah, that changes things a little.\n\nI just thought we wanted to log the range from the proxy side. To see why the different lengths, object side makes more sense. Although wouldn\u0027t the range header be added from the original request, or if changed when the object request is made, which is in the EC Getter so we \"could\" add an info log line or something there, I mean especially if this is for debugging not perm.\n\nJust spit balling.","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4fdb76cea8f04903d975efdbfdb241b7bdf08f82","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                                anonymization_salt),"},{"line_number":831,"context_line":"        \u0027status\u0027: res.status.split()[0],"},{"line_number":832,"context_line":"        \u0027content_length\u0027: res.content_length,"},{"line_number":833,"context_line":"        \u0027range\u0027: req.headers.get(\u0027range\u0027),"},{"line_number":834,"context_line":"        \u0027referer\u0027: StrAnonymizer(req.referer, anonymization_method,"},{"line_number":835,"context_line":"                                 anonymization_salt),"},{"line_number":836,"context_line":"        \u0027txn_id\u0027: req.headers.get(\u0027x-trans-id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"28facd6b_e809b07f","line":833,"in_reply_to":"6c3f305c_53e8161b","updated":"2022-01-27 03:00:54.000000000","message":"Clay is right, seems we already have a way of logging headers in proxy logging.\n\nHere is a log line by default from my SAIO:\n\n  Jan 27 02:46:39 saio1 proxy-server[15151]: 127.0.0.1 127.0.0.1 27/Jan/2022/02/46/39 GET /v1/AUTH_test/ec/o HTTP/1.0 206 - curl/7.58.0 AUTH_tk02a16e525... - 99 - tx9f01d25c5aa94ad5b30f3-0061f2078f - 0.0246 - - 1643251599.145984888 1643251599.170571089 1\n\nThen if we add to the proxy-logging section of the configuration:\n\n  [filter:proxy-logging]\n  use \u003d egg:swift#proxy_logging\n  access_log_headers \u003d true\n  access_log_headers_only \u003d Range\n\nThen we get:\n\n  Jan 27 02:49:51 saio1 proxy-server[15444]: 127.0.0.1 127.0.0.1 27/Jan/2022/02/49/51 GET /v1/AUTH_test/ec/o HTTP/1.0 206 - curl/7.58.0 AUTH_tk02a16e525... - 99 - txbff7b6ff6ee2496f825e8-0061f2084f Range:%20bytes%3D0-98 0.0684 - - 1643251791.292458057 1643251791.360898018 1\n\nFurther if `range` does not exist in the request, it\u0027s as per normal:\n\n  Jan 27 02:57:36 saio1 proxy-server[15444]: 127.0.0.1 127.0.0.1 27/Jan/2022/02/57/36 GET /v1/AUTH_test/ec/o HTTP/1.0 200 - curl/7.58.0 AUTH_tk02a16e525... - 2175 - tx60915d1e184d46f399265-0061f20a20 - 0.0590 - - 1643252256.865923882 1643252256.924958944","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8cd6980734e63d8e104c7406f8323e8c004fe7e5","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                                anonymization_salt),"},{"line_number":831,"context_line":"        \u0027status\u0027: res.status.split()[0],"},{"line_number":832,"context_line":"        \u0027content_length\u0027: res.content_length,"},{"line_number":833,"context_line":"        \u0027range\u0027: req.headers.get(\u0027range\u0027),"},{"line_number":834,"context_line":"        \u0027referer\u0027: StrAnonymizer(req.referer, anonymization_method,"},{"line_number":835,"context_line":"                                 anonymization_salt),"},{"line_number":836,"context_line":"        \u0027txn_id\u0027: req.headers.get(\u0027x-trans-id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"6c3f305c_53e8161b","line":833,"in_reply_to":"b1ef77e6_01ce993a","updated":"2022-01-26 22:11:12.000000000","message":"If follows the pattern established by txn_id, referer, and user_agent (as well as content_length, on the response side). We could offer all headers, but I struggle to think of what else might actually be interesting. Maybe some things like x-backend-record-type in the container-server? The targeted change seemed preferable to me. *shrug*","commit_id":"16b7893817d1212802e3eb52a514b35cf42a3579"}]}
