)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":true,"context_lines":[{"line_number":26,"context_line":"Request tracing utilises the OpenTelemetry framework, which has now"},{"line_number":27,"context_line":"become a swift dependency. We could pull this out and warn."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Because a trace is scoped by the request. There is a trace_data object that"},{"line_number":30,"context_line":"is used to store some tracing metadata. Namely:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":" - The call stack (so we can name middleware uniquely)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"95ee8776_e14ee5c1","line":29,"updated":"2022-11-14 16:14:20.000000000","message":"this wraps funny OMM","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4f10426b2311ce714cabb11c1e9a317d33b15ac9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"afcbd06c_28a60c00","updated":"2022-09-14 14:07:36.000000000","message":"I would love to try out a vsaio branch that can set this up for me.\n\nI\u0027m curious what our test infra for this change will look like - I imagine it\u0027s a bit like testing logging: mostly about coverage and sanity checks.\n\nI wonder how we could trace what kinds of spans get created in each test using some kind of BaseTracingTestCase https://pypi.org/project/pytest-opentelemetry/\n\nMaybe interesting to consider how a probetest could tell it\u0027s internal client to capture a trace during a particularly ugly failure mode the test setup and make some asserts about all the retries the proxy had to do under brain split just to get the wrong answer.","commit_id":"ea0166a5c61ca97fe20aedbcd48fdf2f95571302"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2420338261c6f19cc6ca2a389e77a3c952aff6ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"05f603cc_eadede8b","in_reply_to":"afcbd06c_28a60c00","updated":"2022-09-26 06:40:50.000000000","message":"Thanks Clay. pytest-opentelemetry seems to be a plug in to intrumenty your unittests. But there seems to be an inmemory exporter we can use so started playing with a \"debug tracer\" we can use to test some traces.\n\nStill a WIP of course.","commit_id":"ea0166a5c61ca97fe20aedbcd48fdf2f95571302"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"36e239594ffbdb662cd1f5258d98f90aa8afb5d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ea72fbb8_1ab01ab3","updated":"2022-10-28 15:36:11.000000000","message":"looks like Ash was trying to help with some cleanup - maybe he\u0027s going to do some review?\n\n... maybe still needs more tests.","commit_id":"32ad3626881061754feed945ebb04e174a93208d"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"a0cc921c5662641589db50d96e2d3f3612114d07","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"8a00acb8_0f9e5ad1","in_reply_to":"ea72fbb8_1ab01ab3","updated":"2023-08-17 16:16:29.000000000","message":"I was trying to help out Matt here since i find this feature handy!","commit_id":"32ad3626881061754feed945ebb04e174a93208d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"fe35ced8_11d0725c","updated":"2022-11-14 23:07:30.000000000","message":"Thanks for the review Clay.\n\nYeah, I keep meaning to get back to this to clean it up some more. I\u0027ve started. But there probably is still parts that are cruft from OpenTracing and before.\nOTel has simplified it a bunch, which is nice.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c5cc4e38_03c1011b","updated":"2022-11-14 16:14:20.000000000","message":"there\u0027s a lot going on here - not sure how far this is from what we want to actually merge.\n\nIt looks like there\u0027s still some cleanup to work on.\n\nI\u0027m hoping we get to see some some sort of sanity check testing where you can assert \"container HEAD embeds account_info\" and \"account_info span \u003c container_head span\" or something.\n\nMaybe the docs are ok - I don\u0027t docs say much about how to setup statsd.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"7220cda1_834082bf","in_reply_to":"c5cc4e38_03c1011b","updated":"2022-11-14 23:07:30.000000000","message":"Well I\u0027ve got an in memory exporter that I hope will work for testing. Maybe use that to test the tracing base class, tooling and helper methods. Maybe extend it to particular bits of instrumented code.\n \nThen use it again in a set of probe tests, because that\u0027s how we might see some inter cluster interactions. But because each server runs seperately not sure how connected they\u0027ll be.. but there should be span parent contexts to connect them.. I guess I should go figure that out.\nMaybe I can just use a mocked otel collector endpoint and hope to get json spans.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"}],"swift/cli/trace_signature.py":[{"author":{"_account_id":36647,"name":"Matheus Victorello","display_name":"Matheus Victorello","email":"matheusvictorello@gmail.com","username":"mvictorello"},"change_message_id":"77cf37a0501f03d40e3e39813daeae1d339a23c8","unresolved":true,"context_lines":[{"line_number":17,"context_line":"import argparse"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from swift.common.wsgi import get_trace_hmac"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def main(args):"}],"source_content_type":"text/x-python","patch_set":20,"id":"4232b3c7_1d3420d5","line":20,"updated":"2024-01-03 12:06:20.000000000","message":"\u0027get_trace_hmac\u0027 is currently located in \u0027swift.common.trace\u0027","commit_id":"528074390a7b041142bbf14a04e17ae396b4b16a"}],"swift/common/middleware/bulk.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"36e239594ffbdb662cd1f5258d98f90aa8afb5d7","unresolved":true,"context_lines":[{"line_number":336,"context_line":"                    req.environ, method\u003d\u0027PUT\u0027, path\u003dwsgi_quote(container_path),"},{"line_number":337,"context_line":"                    headers\u003d{\u0027X-Auth-Token\u0027: req.headers.get(\u0027X-Auth-Token\u0027)},"},{"line_number":338,"context_line":"                    swift_source\u003d\u0027EA\u0027)"},{"line_number":339,"context_line":"                # create_cont_req.headers.update(trace_headers)"},{"line_number":340,"context_line":"                resp \u003d create_cont_req.get_response(self.app)"},{"line_number":341,"context_line":"                if resp.is_success:"},{"line_number":342,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"4d3a9792_3f27646a","line":339,"updated":"2022-10-28 15:36:11.000000000","message":"why not pull out this too?","commit_id":"32ad3626881061754feed945ebb04e174a93208d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b37f7039b8a715fa0ddd495251c8c0a4bd0c2105","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                    req.environ, method\u003d\u0027PUT\u0027, path\u003dwsgi_quote(container_path),"},{"line_number":337,"context_line":"                    headers\u003d{\u0027X-Auth-Token\u0027: req.headers.get(\u0027X-Auth-Token\u0027)},"},{"line_number":338,"context_line":"                    swift_source\u003d\u0027EA\u0027)"},{"line_number":339,"context_line":"                # create_cont_req.headers.update(trace_headers)"},{"line_number":340,"context_line":"                resp \u003d create_cont_req.get_response(self.app)"},{"line_number":341,"context_line":"                if resp.is_success:"},{"line_number":342,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"49020ea8_0a4991d1","line":339,"in_reply_to":"4d3a9792_3f27646a","updated":"2022-11-09 21:28:07.000000000","message":"Done","commit_id":"32ad3626881061754feed945ebb04e174a93208d"}],"swift/common/middleware/copy.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":true,"context_lines":[{"line_number":282,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":283,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    @trace_function_time()"},{"line_number":286,"context_line":"    def _get_source_object(self, ssc_ctx, source_path, req):"},{"line_number":287,"context_line":"        source_req \u003d req.copy_get()"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7be5bf68_eafc9704","line":285,"updated":"2022-11-14 16:14:20.000000000","message":"when is this better tha the new_span context manager?","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":true,"context_lines":[{"line_number":282,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":283,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    @trace_function_time()"},{"line_number":286,"context_line":"    def _get_source_object(self, ssc_ctx, source_path, req):"},{"line_number":287,"context_line":"        source_req \u003d req.copy_get()"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3058e69e_d5955572","line":285,"in_reply_to":"7be5bf68_eafc9704","updated":"2022-11-14 23:07:30.000000000","message":"Good question!\nIn the very early version of tracing (before there was even OpenTracing) this decorator just captured entry and exit time, ie it was used for \"benchmarking\" functions, which is how this all started.\n\nNow that we have spans and span releated context managers, which also by default give us timing. Maybe we don\u0027t need this anymore.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"}],"swift/common/middleware/request_trace.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":25,"context_line":"specified in the middleware configuration and an expiry timestamp."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"If the hmac matches the signature then tracing of the request will start."},{"line_number":28,"context_line":"The other approach is to enable tracing on every x\u0027th request. This can be"},{"line_number":29,"context_line":"done via the `trace_every_x` configuration option. This second option would"},{"line_number":30,"context_line":"be used in places you can\u0027t send a trace_sig, like internal client."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"06b704b0_d1067dd5","line":28,"updated":"2023-05-05 23:59:30.000000000","message":"This line should start a new paragraph. The previous line probably belongs with the previous paragraph.","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":76,"context_line":"        if self.key and req.params.get(\"trace_sig\"):"},{"line_number":77,"context_line":"            enable_trace(env, self.key, self.allowed_digests)"},{"line_number":78,"context_line":"        elif self.trace_every_x:"},{"line_number":79,"context_line":"            if self.increment_req_count() \u003d\u003d self.trace_every_x:"},{"line_number":80,"context_line":"                env[TRACE_ACTIVATED_KEY] \u003d \u0027yes\u0027"},{"line_number":81,"context_line":"        # Check to see if we should continue a trace, the trace should"},{"line_number":82,"context_line":"        # have been injected into the headers. We pass along an"}],"source_content_type":"text/x-python","patch_set":18,"id":"09ff1100_970cfa74","line":79,"updated":"2023-05-05 23:59:30.000000000","message":"I wonder if it\u0027d be better to just use `random.random() \u003c 1.0 / self.trace_every_x` rather than tracking exact counts -- those won\u0027t be shared between workers, so it\u0027d be hard to make any guarantees about it anyway.","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            enable_trace(env, self.key, self.allowed_digests)"},{"line_number":78,"context_line":"        elif self.trace_every_x:"},{"line_number":79,"context_line":"            if self.increment_req_count() \u003d\u003d self.trace_every_x:"},{"line_number":80,"context_line":"                env[TRACE_ACTIVATED_KEY] \u003d \u0027yes\u0027"},{"line_number":81,"context_line":"        # Check to see if we should continue a trace, the trace should"},{"line_number":82,"context_line":"        # have been injected into the headers. We pass along an"},{"line_number":83,"context_line":"        # X-Backend-Tracing-Continue header if it does. Because different"}],"source_content_type":"text/x-python","patch_set":18,"id":"6d27bcab_44592b3d","line":80,"updated":"2023-05-05 23:59:30.000000000","message":"OK, so this middleware is the primary, expected way to see tracing get enabled. It follows that\n\n- Operators should configure it pretty far to the left of their proxy pipelines\n- If an operator tries to configure this middleware on py2, we should make sure the server fails to start\n\nIs it fair to say that operators _should not_ configure `trace_every_x` when configuring this for backend servers? It seems like it\u0027d be a little weird to do that, at least to me. They _might_ want to configure it for `InteralClient`, though.","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"}],"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":true,"context_lines":[{"line_number":144,"context_line":"from cgi import parse_header"},{"line_number":145,"context_line":"import json"},{"line_number":146,"context_line":"from paste.deploy import loadwsgi"},{"line_number":147,"context_line":"from six.moves.urllib.parse import parse_qs"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"from swift.common.constraints import valid_api_version"},{"line_number":150,"context_line":"from swift.common.middleware.listing_formats import \\"}],"source_content_type":"text/x-python","patch_set":8,"id":"fbabda58_314e3eb8","side":"PARENT","line":147,"updated":"2022-11-14 16:14:20.000000000","message":"what is going on with this change?  It\u0027s HUGE?","commit_id":"a4696f84e4cf9b3de2164b9aaab210c6dfe819ea"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":true,"context_lines":[{"line_number":144,"context_line":"from cgi import parse_header"},{"line_number":145,"context_line":"import json"},{"line_number":146,"context_line":"from paste.deploy import loadwsgi"},{"line_number":147,"context_line":"from six.moves.urllib.parse import parse_qs"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"from swift.common.constraints import valid_api_version"},{"line_number":150,"context_line":"from swift.common.middleware.listing_formats import \\"}],"source_content_type":"text/x-python","patch_set":8,"id":"a3a7a2b2_df6977a2","side":"PARENT","line":147,"in_reply_to":"fbabda58_314e3eb8","updated":"2022-11-14 23:07:30.000000000","message":"hmm, now that\u0027s a good question. I assume this came in via a rebase, because this has nothing to do with tracing.","commit_id":"a4696f84e4cf9b3de2164b9aaab210c6dfe819ea"}],"swift/common/request_helpers.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":591,"context_line":"                yield (\u0027data segment\u0027, data_or_req)"},{"line_number":592,"context_line":"                continue"},{"line_number":593,"context_line":"            seg_req \u003d data_or_req"},{"line_number":594,"context_line":"            with self.app.new_trace_span(self.req.environ,"},{"line_number":595,"context_line":"                                         \u0027_requests_to_bytes_iter\u0027):"},{"line_number":596,"context_line":"                seg_resp \u003d seg_req.get_response(self.app)"},{"line_number":597,"context_line":"            if not is_success(seg_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":18,"id":"b07f278b_1e301212","line":594,"range":{"start_line":594,"start_character":26,"end_line":594,"end_character":40},"updated":"2023-05-05 23:59:30.000000000","message":"Are we sure that `self.app` inherits from `TraceMixin`?","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"}],"swift/common/trace/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":25,"context_line":"from contextlib import contextmanager"},{"line_number":26,"context_line":"from six.moves.urllib.parse import parse_qs"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from opentelemetry.propagate import inject"},{"line_number":29,"context_line":"from opentelemetry.semconv.trace import SpanAttributes"},{"line_number":30,"context_line":"from opentelemetry import trace"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"af4423c1_15b08877","line":28,"updated":"2023-05-05 23:59:30.000000000","message":"We could probably get this to not break py2 by making the import lazy... won\u0027t _work_ on py2, of course, but that\u0027s fine. Should make sure that it fails early and obviously if you try to configure tracing on py2, though.\n\nEven better would be if we had something similar for py3 -- then opentelemetry could be an extra rather than a hard requirement.","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":136,"context_line":"                span.record_exception(ex)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"def enable_trace(env, key, allowed_digests):"},{"line_number":140,"context_line":"    trace_sig \u003d trace_expires \u003d None"},{"line_number":141,"context_line":"    qs \u003d parse_qs(env.get(\u0027QUERY_STRING\u0027, \u0027\u0027), keep_blank_values\u003dTrue)"},{"line_number":142,"context_line":"    if \u0027trace_sig\u0027 in qs:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ee64bdb2_2fea372c","line":139,"range":{"start_line":139,"start_character":4,"end_line":139,"end_character":16},"updated":"2023-05-05 23:59:30.000000000","message":"I expected `enable_trace` to look more like\n```\ndef enable_trace(env):\n    env[TRACE_ACTIVATED_KEY] \u003d \u0027yes\u0027\n```\nand mostly exist so callers wouldn\u0027t have to poke at `TRACE_ACTIVATED_KEY` themselves.\n\nMaybe this would be better named `authorize_trace` or something?","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"},{"author":{"_account_id":36647,"name":"Matheus Victorello","display_name":"Matheus Victorello","email":"matheusvictorello@gmail.com","username":"mvictorello"},"change_message_id":"77cf37a0501f03d40e3e39813daeae1d339a23c8","unresolved":true,"context_lines":[{"line_number":170,"context_line":"    if hash_name not in allowed_digests:"},{"line_number":171,"context_line":"        return"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    if trace_expires and get_trace_hmac(key, trace_expires, hash_name) \\"},{"line_number":174,"context_line":"            \u003d\u003d trace_sig:"},{"line_number":175,"context_line":"        env[TRACE_ACTIVATED_KEY] \u003d \u0027yes\u0027"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"2187f856_721d263e","line":173,"updated":"2024-01-03 12:06:20.000000000","message":"This comparison is incorrect. The \u0027trace_sig\u0027 may include the hash algorithm as a prefix, similar to the output of cli/trace_signature.py. In such cases, the comparison will always return false, preventing the activation of tracing. Additionally, the line \u0027hash_name, signature \u003d digest.extract_digest_and_algorithm(trace_sig)\u0027 is currently not utilized in the code.","commit_id":"528074390a7b041142bbf14a04e17ae396b4b16a"}],"swift/common/trace/tracer/jaeger.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":20,"context_line":"    from opentelemetry.exporter.jaeger.thrift import JaegerExporter"},{"line_number":21,"context_line":"    JAEGER_LOADED \u003d True"},{"line_number":22,"context_line":"except ImportError:"},{"line_number":23,"context_line":"    JAEGER_LOADED \u003d False"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from swift.common.exceptions import TracerLoadException"},{"line_number":26,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":18,"id":"1941f017_d6b6fbe9","line":23,"updated":"2023-05-05 23:59:30.000000000","message":"Love the lazy-loading!","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":48,"context_line":"        trace.set_tracer_provider(trace_provider)"},{"line_number":49,"context_line":"    else:"},{"line_number":50,"context_line":"        raise TracerLoadException("},{"line_number":51,"context_line":"            \u0027OpenTelemetry Jaeger exporter module not installed\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3b78ee7f_0ca5f109","line":51,"updated":"2023-05-05 23:59:30.000000000","message":"We should probably use the exact package name they ought to `pip install`","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"}],"swift/common/trace/tracer/otel.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"60332d9a715f0b029473c0821427c8760fd395ee","unresolved":true,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"from opentelemetry import trace"},{"line_number":16,"context_line":"from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \\"},{"line_number":17,"context_line":"    OTLPSpanExporter"},{"line_number":18,"context_line":"from opentelemetry.sdk.resources import SERVICE_NAME, Resource"},{"line_number":19,"context_line":"from opentelemetry.sdk.trace import TracerProvider"},{"line_number":20,"context_line":"from opentelemetry.sdk.trace.export import BatchSpanProcessor"}],"source_content_type":"text/x-python","patch_set":18,"id":"1042ee8a_48a7d312","line":17,"updated":"2023-05-05 23:59:30.000000000","message":"Should this one get lazy-loading, too?","commit_id":"c1cfcb4811f9ec566714bbb7c6475226beb84763"}],"swift/common/wsgi.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"652c0062af4da81a1d4a3d810b7b9a9bb1dfe46b","unresolved":true,"context_lines":[{"line_number":1551,"context_line":"            current_span.set_attribute(key, value)"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def trace_exception(self, ex, env):"},{"line_number":1554,"context_line":"        if env and self.is_tracing(env):"},{"line_number":1555,"context_line":"            span \u003d trace.get_current_span()"},{"line_number":1556,"context_line":"            if not isinstance(span, trace.NonRecordingSpan):"},{"line_number":1557,"context_line":"                span.record_exception(ex)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dabddb83_a3196f99","line":1554,"range":{"start_line":1554,"start_character":8,"end_line":1554,"end_character":40},"updated":"2022-11-16 07:15:15.000000000","message":"This check on a bunch of these may not be required. The if instance check like on line 1556:\n\n  if not isinstance(span, trace.NonRecordingSpan):\n  \nIs using the global trace object, get current span to see if its recording or not.\n\nThe check is basically incase this could bleed into another request :shrug:","commit_id":"6d13d45c2e4697d7c98e1c733577e41e9f61db32"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"933da659e1ef34eaf5965667e23a8398690921bc","unresolved":false,"context_lines":[{"line_number":1551,"context_line":"            current_span.set_attribute(key, value)"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def trace_exception(self, ex, env):"},{"line_number":1554,"context_line":"        if env and self.is_tracing(env):"},{"line_number":1555,"context_line":"            span \u003d trace.get_current_span()"},{"line_number":1556,"context_line":"            if not isinstance(span, trace.NonRecordingSpan):"},{"line_number":1557,"context_line":"                span.record_exception(ex)"}],"source_content_type":"text/x-python","patch_set":10,"id":"c01d7a12_7dd67903","line":1554,"range":{"start_line":1554,"start_character":8,"end_line":1554,"end_character":40},"in_reply_to":"dabddb83_a3196f99","updated":"2023-05-26 06:31:21.000000000","message":"Ack","commit_id":"6d13d45c2e4697d7c98e1c733577e41e9f61db32"}],"swift/obj/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":true,"context_lines":[{"line_number":362,"context_line":"            timestamp \u003d headers_out.get(\u0027x-meta-timestamp\u0027,"},{"line_number":363,"context_line":"                                        headers_out.get(\u0027x-timestamp\u0027))"},{"line_number":364,"context_line":"            self._diskfile_router[policy].pickle_async_update("},{"line_number":365,"context_line":"                objdevice, account, container, obj, data, timestamp, policy)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def container_update(self, op, account, container, obj, request,"},{"line_number":368,"context_line":"                         headers_out, objdevice, policy):"}],"source_content_type":"text/x-python","patch_set":8,"id":"e3621a04_3cb3b40e","line":365,"updated":"2022-11-14 16:14:20.000000000","message":"this is a pretty big block to indent - it might look better with a method extraction to _async_update, maybe try and simplify the signature too.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6b65c12537b66a04903245be79ed326969b327c3","unresolved":false,"context_lines":[{"line_number":362,"context_line":"            timestamp \u003d headers_out.get(\u0027x-meta-timestamp\u0027,"},{"line_number":363,"context_line":"                                        headers_out.get(\u0027x-timestamp\u0027))"},{"line_number":364,"context_line":"            self._diskfile_router[policy].pickle_async_update("},{"line_number":365,"context_line":"                objdevice, account, container, obj, data, timestamp, policy)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def container_update(self, op, account, container, obj, request,"},{"line_number":368,"context_line":"                         headers_out, objdevice, policy):"}],"source_content_type":"text/x-python","patch_set":8,"id":"66ca9d79_68d43295","line":365,"in_reply_to":"914b5721_15f3dac9","updated":"2022-11-16 07:12:04.000000000","message":"Done","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":true,"context_lines":[{"line_number":362,"context_line":"            timestamp \u003d headers_out.get(\u0027x-meta-timestamp\u0027,"},{"line_number":363,"context_line":"                                        headers_out.get(\u0027x-timestamp\u0027))"},{"line_number":364,"context_line":"            self._diskfile_router[policy].pickle_async_update("},{"line_number":365,"context_line":"                objdevice, account, container, obj, data, timestamp, policy)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def container_update(self, op, account, container, obj, request,"},{"line_number":368,"context_line":"                         headers_out, objdevice, policy):"}],"source_content_type":"text/x-python","patch_set":8,"id":"914b5721_15f3dac9","line":365,"in_reply_to":"e3621a04_3cb3b40e","updated":"2022-11-14 23:07:30.000000000","message":"+1 great idea. I did do it in other places. Not sure why I didn\u0027t do it more universally. Probably adding context managers while debugging the jaeger graphs and got lazy.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e62fd63fbf6d7be8ae2746e738f38acc20797641","unresolved":true,"context_lines":[{"line_number":449,"context_line":"            try:"},{"line_number":450,"context_line":"                with Timeout(self.container_update_timeout):"},{"line_number":451,"context_line":"                    all(pile)"},{"line_number":452,"context_line":"            except Timeout:"},{"line_number":453,"context_line":"                # updates didn\u0027t go through, log it and return"},{"line_number":454,"context_line":"                msg \u003d \u0027Container update timeout (%.4fs) waiting for %s\u0027 % ("},{"line_number":455,"context_line":"                    self.container_update_timeout, updates)"}],"source_content_type":"text/x-python","patch_set":8,"id":"b2a6af3f_1618b844","line":452,"updated":"2022-11-14 16:14:20.000000000","message":"I\u0027m really curious what the trace looks like when you cancel the parent context before the wrapped context finishes.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b209efa1b0f5250995cd28f0b3b2c3011ab536d6","unresolved":true,"context_lines":[{"line_number":449,"context_line":"            try:"},{"line_number":450,"context_line":"                with Timeout(self.container_update_timeout):"},{"line_number":451,"context_line":"                    all(pile)"},{"line_number":452,"context_line":"            except Timeout:"},{"line_number":453,"context_line":"                # updates didn\u0027t go through, log it and return"},{"line_number":454,"context_line":"                msg \u003d \u0027Container update timeout (%.4fs) waiting for %s\u0027 % ("},{"line_number":455,"context_line":"                    self.container_update_timeout, updates)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f6c26692_40f0e9af","line":452,"in_reply_to":"b2a6af3f_1618b844","updated":"2022-11-14 23:07:30.000000000","message":"oh yeah good question. We\u0027ll probably at the very least get a warning thrown that the parent span has ended. Worse case it might fail to send the extra spans back and we loose them... might need to test that. \n\nIn the Opentracing version I had spans continue to be sent back in the SLO body iter, which means the spans continued after the initial request was returned. So the spans and the tracer seems to be smart enough to continue reporting, even if they outlived their parent (I think). I haven\u0027t tested the SLO GET path with OTel tracing yet.. it might still work :P\n\nSpans on other processes (like the object server) will independently report their trace and span but will be all connected at the other end. I wonder if spans attached to a trace do the same.","commit_id":"9cc248eb24ca16cc271e81e2f3be628bd439368a"}]}
