)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3b351632f054e9d5ecc8e06e7ca5cc033960e318","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        \"Application\""},{"line_number":134,"context_line":"    ],"},{"line_number":135,"context_line":"    \"start_time\": 1624765751.802578"},{"line_number":136,"context_line":"}"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"What would be interesting we should see a shorter call stack if the"},{"line_number":139,"context_line":"request was short circuited before hitting the proxy (Application)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5c8091ab_2ff63809","line":136,"updated":"2022-01-31 03:00:37.000000000","message":"I might need to clean up this patch a little too. Maybe remove this old structure as now we\u0027re using OpenTracing.","commit_id":"20024c728ea3c741b0edce3876c0c607d268a924"}],"swift/account/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":72,"context_line":"    return drive, part, account, container"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class AccountController(BaseStorageServer, TraceMixin):"},{"line_number":76,"context_line":"    \"\"\"WSGI controller for the account server.\"\"\""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    server_type \u003d \u0027account-server\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"bf5f1800_c69433ff","line":75,"range":{"start_line":75,"start_character":24,"end_line":75,"end_character":41},"updated":"2023-05-05 23:28:50.000000000","message":"Would it be better to have `BaseStorageServer` inherit from `TraceMixin`? Would we ever want a `BaseStorageServer` that _didn\u0027t_ have the tracing support?","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"}],"swift/common/middleware/crypto/decrypter.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":441,"context_line":"        return obj_dict"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"class Decrypter(TraceMixin):"},{"line_number":445,"context_line":"    \"\"\"Middleware for decrypting data and user metadata.\"\"\""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def __init__(self, app, conf):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1f3fab49_d723b186","line":444,"updated":"2023-05-05 23:28:50.000000000","message":"OK, so the general expectation is that each WSGI filter should get its own tracing span, even when there may be multiple filters inserted for any given paste entrypoint.\n\nBut then, slightly more complicated filters/apps that use the controller model (like the proxy or s3api) still get it at the filter level, *not* the controller level.","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"}],"swift/common/middleware/keystoneauth.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":29,"context_line":"UNKNOWN_ID \u003d \u0027_unknown\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class KeystoneAuth(TraceMixin):"},{"line_number":33,"context_line":"    \"\"\"Swift middleware to Keystone authorization system."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    In Swift\u0027s proxy-server.conf add this keystoneauth middleware and the"}],"source_content_type":"text/x-python","patch_set":26,"id":"10a27789_8fbe7983","line":32,"updated":"2023-05-05 23:28:50.000000000","message":"This one\u0027s a little interesting... so we **do** get a span for our `keystoneauth` middleware (which makes no network requests), but we **don\u0027t** get one for Keystone\u0027s `authtoken` middleware (which _does_)...\n\nWhat\u0027s our general stance on 3rd party middlewares? They should inherit from `TraceMixin`, too, I guess? Assuming they\u0027re Swift-specific, anyway...\n\nIf a 3rd party middleware *didn\u0027t* do that, and had some reasonable likelihood of increasing request processing time (because it\u0027s making network requests, or doing something CPU-intensive like checking passwords), accurately assigning blame from a trace would get tricky -- it\u0027d look like whatever the closest trace-enabled middleware to the left of the _real_ problem was the problem.\n\nI wonder what it would look like to wrap filters as we build up the pipeline... but I suppose the idea is that individual middlewares will want to do that `self.add_trace(...)` to define their own thing. Maybe it\u0027d still be worth doing for instantiated filters that *don\u0027t* inherit from `TraceMixin`, though?","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"}],"swift/common/trace/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":26,"context_line":"class TraceMixin(object):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __call__(self, env, start_response):"},{"line_number":29,"context_line":"        if not utils.config_true_value(env.get(TRACE_ACTIVATED_KEY)):"},{"line_number":30,"context_line":"            return self.call(env, start_response)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        # trace has been activated. So collect data."}],"source_content_type":"text/x-python","patch_set":26,"id":"125128f4_36ccef78","line":29,"range":{"start_line":29,"start_character":47,"end_line":29,"end_character":66},"updated":"2023-05-05 23:28:50.000000000","message":"So what\u0027s going to twiddle this? I suppose I ought to look further down the chain...\n\nIf it gets set mid-pipeline, only the further-in parts will be traced, right? So we\u0027ll probably want it done pretty far out (maybe even in `SwiftHttpProtocol.get_environ`).","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"}],"swift/proxy/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":499,"context_line":"            req \u003d self.update_request(Request(env))"},{"line_number":500,"context_line":"            self.trace_add(\u0027error_limiting\u0027, dict("},{"line_number":501,"context_line":"                error_suppression_limit\u003dself.error_suppression_limit,"},{"line_number":502,"context_line":"                **self._error_limiting), env)"},{"line_number":503,"context_line":"            return self.handle_request(req)(env, start_response)"},{"line_number":504,"context_line":"        except UnicodeError:"},{"line_number":505,"context_line":"            err \u003d HTTPPreconditionFailed("}],"source_content_type":"text/x-python","patch_set":26,"id":"cbb180aa_ca060a19","line":502,"updated":"2023-05-05 23:28:50.000000000","message":"This sticks out as being different from the fairly mechanical changes elsewhere...","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c982b1de542fed5a98aea598b76ea902aebfeb7e","unresolved":true,"context_lines":[{"line_number":574,"context_line":"                self.logger.txn_id \u003d trans_id"},{"line_number":575,"context_line":"            req.headers[\u0027x-trans-id\u0027] \u003d req.environ[\u0027swift.trans_id\u0027]"},{"line_number":576,"context_line":"            controller.trans_id \u003d req.environ[\u0027swift.trans_id\u0027]"},{"line_number":577,"context_line":"            controller.env \u003d dict(req.environ)"},{"line_number":578,"context_line":"            self.logger.client_ip \u003d get_remote_client(req)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"            allowed_methods \u003d controller.allowed_methods"}],"source_content_type":"text/x-python","patch_set":26,"id":"721c8ab2_aadcc8da","line":577,"updated":"2023-05-05 23:28:50.000000000","message":"?","commit_id":"79c780493f61597991c6f5d6a1c46e191e233b39"}]}
