)]}'
{"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2a3f0f1f0b9142c9f1681e481ac9d67980efadd5","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        except ErrorResponse as err_resp:"},{"line_number":298,"context_line":"            if isinstance(err_resp, InternalError):"},{"line_number":299,"context_line":"                self.logger.exception(err_resp)"},{"line_number":300,"context_line":"            self.logger.set_statsd_prefix(\u0027proxy-server\u0027)"},{"line_number":301,"context_line":"            self.logger.increment("},{"line_number":302,"context_line":"                \u0027s3api.%d.%s\u0027 % (err_resp.status_int, err_resp._code))"},{"line_number":303,"context_line":"            resp \u003d err_resp"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_56756563","line":300,"updated":"2020-11-08 23:56:01.000000000","message":"I thought we let ops define their own prefix. Does this overwrite what they may have already defined. Although maybe we\u0027re defining our own logger so maybe it\u0027s ok?\n\nI must admit it\u0027s been a while since I\u0027ve played with the statsd swift subsystem.","commit_id":"27b5fa8952c508845ca80c6b8106e7cb0461acea"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"785d325a4bfad64442f8f7bb059380f5db798f29","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        except ErrorResponse as err_resp:"},{"line_number":298,"context_line":"            if isinstance(err_resp, InternalError):"},{"line_number":299,"context_line":"                self.logger.exception(err_resp)"},{"line_number":300,"context_line":"            self.logger.set_statsd_prefix(\u0027proxy-server\u0027)"},{"line_number":301,"context_line":"            self.logger.increment("},{"line_number":302,"context_line":"                \u0027s3api.%d.%s\u0027 % (err_resp.status_int, err_resp._code))"},{"line_number":303,"context_line":"            resp \u003d err_resp"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_d7196522","line":300,"in_reply_to":"1f621f24_56756563","updated":"2020-11-09 22:17:28.000000000","message":"So, near as I can tell, we\u0027ve got prefixes and we\u0027ve got prefixes ;-)\n\nWhen we set up the logger [0], we set a base_prefix that can be operator defined. But there\u0027s also a *tail_prefix* that defaults to the logger\u0027s name; that\u0027s the part we update here.\n\nI\u0027ll admit, the whole thing feels weird. However, without it, I\u0027d *sometimes* get stats like\n\n  proxy-server.s3api.400.AuthorizationHeaderMalformed\n\nand *sometimes* like\n\n proxy-server.account.s3api.400.AuthorizationHeaderMalformed\n\n... and that\u0027s not great :-/\n\nFWIW, we do something just like this in proxy/server.py [1]. I suspect that\u0027s what\u0027s causing the spotty results above, though I\u0027m not clear on why s3api and the proxy-server are using the same logger/statsd client...\n\n[0] https://github.com/openstack/swift/blob/2.26.0/swift/common/utils.py#L2394\n[1] https://github.com/openstack/swift/blob/2.26.0/swift/proxy/server.py#L505","commit_id":"27b5fa8952c508845ca80c6b8106e7cb0461acea"}]}
