)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9a99ddd520b34dd41579e5101b55fa4573bd6653","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"1f0912d1_1fa1ae7d","updated":"2023-05-23 08:55:53.000000000","message":"Hello,\n\nFirst thanks for this patch and for all your recent contributions.\n\nSee my inline suggestion.\nAlso I\u0027d suggest you to add some related docs with an example of usecase where user should think about enabling this feature.\n\nElse looks good to me.","commit_id":"196c9b53145e38a82ed2eead53b4d4aef3a8de66"}],"osprofiler/drivers/jaeger_otlp.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"0f84e321b9fcc989a2fbd7ca23804568a3fbfa62","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def _name(self, payload):"},{"line_number":78,"context_line":"        info \u003d payload[\"info\"]"},{"line_number":79,"context_line":"        if info.get(\"request\"):"},{"line_number":80,"context_line":"            return \"WSGI_{}_{}\".format("},{"line_number":81,"context_line":"                info[\"request\"][\"method\"], info[\"request\"][\"path\"])"},{"line_number":82,"context_line":"        elif info.get(\"db\"):"},{"line_number":83,"context_line":"            return \"SQL_{}\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"29a0991e_b5599702","line":80,"range":{"start_line":80,"start_character":20,"end_line":80,"end_character":25},"updated":"2023-04-11 12:21:21.000000000","message":"we have to make sure this is merged in the same release as the parent patch.","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"0f84e321b9fcc989a2fbd7ca23804568a3fbfa62","unresolved":true,"context_lines":[{"line_number":83,"context_line":"            return \"SQL_{}\".format("},{"line_number":84,"context_line":"                info[\"db\"][\"statement\"].split(\u0027 \u0027, 1)[0].upper())"},{"line_number":85,"context_line":"        elif info.get(\"requests\"):"},{"line_number":86,"context_line":"            return \"HTTP_{}_{}\".format("},{"line_number":87,"context_line":"                info[\"requests\"][\"method\"], info[\"requests\"][\"hostname\"])"},{"line_number":88,"context_line":"        return payload[\"name\"].rstrip(\"-start\")"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"6647d565_55640762","line":86,"range":{"start_line":86,"start_character":20,"end_line":86,"end_character":25},"updated":"2023-04-11 12:21:21.000000000","message":"it\u0027s not clear what http means here(manly it\u0027s not clear whether this represents incoming http requests or outgoing http requests). probably simple REQUESTS can be better as it basically represents at which module this is captured ?\n\nAlso, we\u0027d want to consider what elements we should additionally have\n - scheme\n - port\n - path\n \nthough these might not needed if we assume these can work as search key in datastore side.","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9890b5a58349b172babfdf90c685b6cda67bafba","unresolved":true,"context_lines":[{"line_number":83,"context_line":"            return \"SQL_{}\".format("},{"line_number":84,"context_line":"                info[\"db\"][\"statement\"].split(\u0027 \u0027, 1)[0].upper())"},{"line_number":85,"context_line":"        elif info.get(\"requests\"):"},{"line_number":86,"context_line":"            return \"HTTP_{}_{}\".format("},{"line_number":87,"context_line":"                info[\"requests\"][\"method\"], info[\"requests\"][\"hostname\"])"},{"line_number":88,"context_line":"        return payload[\"name\"].rstrip(\"-start\")"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"463be2aa_8444b3dd","line":86,"range":{"start_line":86,"start_character":20,"end_line":86,"end_character":25},"in_reply_to":"6647d565_55640762","updated":"2023-04-25 09:12:42.000000000","message":"Not sure to catch all what you are looking for in this step","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"}],"osprofiler/drivers/otlp.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"69b386eb7108d7bb50cf69836d57a4626464e19a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def _name(self, payload):"},{"line_number":89,"context_line":"        info \u003d payload[\"info\"]"},{"line_number":90,"context_line":"        if info.get(\"request\"):"},{"line_number":91,"context_line":"            return \"WSGI_{}_{}\".format("},{"line_number":92,"context_line":"                info[\"request\"][\"method\"], info[\"request\"][\"path\"])"},{"line_number":93,"context_line":"        elif info.get(\"db\"):"},{"line_number":94,"context_line":"            return \"SQL_{}\".format("}],"source_content_type":"text/x-python","patch_set":11,"id":"fc20d807_25490dc6","line":91,"range":{"start_line":91,"start_character":20,"end_line":91,"end_character":25},"updated":"2023-05-23 03:00:34.000000000","message":"This is a breaking change which we should generally avoid.\n\nHowever otlp driver was added quite recently and we have never created a release since then. So updating this has no user impact.","commit_id":"196c9b53145e38a82ed2eead53b4d4aef3a8de66"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3606846ca05a84fa62ef8e2e7083460532896fd0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def _name(self, payload):"},{"line_number":89,"context_line":"        info \u003d payload[\"info\"]"},{"line_number":90,"context_line":"        if info.get(\"request\"):"},{"line_number":91,"context_line":"            return \"WSGI_{}_{}\".format("},{"line_number":92,"context_line":"                info[\"request\"][\"method\"], info[\"request\"][\"path\"])"},{"line_number":93,"context_line":"        elif info.get(\"db\"):"},{"line_number":94,"context_line":"            return \"SQL_{}\".format("}],"source_content_type":"text/x-python","patch_set":11,"id":"a42f18cf_077dc303","line":91,"range":{"start_line":91,"start_character":20,"end_line":91,"end_character":25},"in_reply_to":"fc20d807_25490dc6","updated":"2023-05-23 07:23:38.000000000","message":"Good point.","commit_id":"196c9b53145e38a82ed2eead53b4d4aef3a8de66"}],"osprofiler/requests.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"0f84e321b9fcc989a2fbd7ca23804568a3fbfa62","unresolved":true,"context_lines":[{"line_number":38,"context_line":"            \"query\": parsed_url.query,"},{"line_number":39,"context_line":"            \"path\": parsed_url.path,"},{"line_number":40,"context_line":"            \"hostname\": parsed_url.hostname,"},{"line_number":41,"context_line":"            \"port\": parsed_url.port or \"\","},{"line_number":42,"context_line":"            \"scheme\": parsed_url.scheme}})"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Profiling headers are overrident to take in account this new"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f5b27fb_fdfaab01","line":41,"range":{"start_line":41,"start_character":13,"end_line":41,"end_character":17},"updated":"2023-04-11 12:21:21.000000000","message":"just wondering if we want to \"guess\" the port from scheme (80 or 443)","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9890b5a58349b172babfdf90c685b6cda67bafba","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            \"query\": parsed_url.query,"},{"line_number":39,"context_line":"            \"path\": parsed_url.path,"},{"line_number":40,"context_line":"            \"hostname\": parsed_url.hostname,"},{"line_number":41,"context_line":"            \"port\": parsed_url.port or \"\","},{"line_number":42,"context_line":"            \"scheme\": parsed_url.scheme}})"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Profiling headers are overrident to take in account this new"}],"source_content_type":"text/x-python","patch_set":3,"id":"f6dd1278_7b31a0b8","line":41,"range":{"start_line":41,"start_character":13,"end_line":41,"end_character":17},"in_reply_to":"7f5b27fb_fdfaab01","updated":"2023-04-25 09:12:42.000000000","message":"Done","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"0f84e321b9fcc989a2fbd7ca23804568a3fbfa62","unresolved":true,"context_lines":[{"line_number":44,"context_line":"        # Profiling headers are overrident to take in account this new"},{"line_number":45,"context_line":"        # context/span."},{"line_number":46,"context_line":"        request.headers.update("},{"line_number":47,"context_line":"            web.get_trace_id_headers())"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        response \u003d _FUNC(self, request, *args, **kwargs)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"e7199b50_203e86a7","line":47,"range":{"start_line":47,"start_character":16,"end_line":47,"end_character":36},"updated":"2023-04-11 12:21:21.000000000","message":"this should probably be moved to profiler because now it\u0027s commonly used by web and requests.","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"d455dc313396fa924263f0461638a935cabb17ec","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Profiling headers are overrident to take in account this new"},{"line_number":45,"context_line":"        # context/span."},{"line_number":46,"context_line":"        request.headers.update("},{"line_number":47,"context_line":"            web.get_trace_id_headers())"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        response \u003d _FUNC(self, request, *args, **kwargs)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"515ccaa9_f175d0fb","line":47,"range":{"start_line":47,"start_character":16,"end_line":47,"end_character":36},"in_reply_to":"8ac6333e_42182787","updated":"2023-05-10 11:20:51.000000000","message":"We can\u0027t do that, some projects are importing this method. I had to revert.","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9890b5a58349b172babfdf90c685b6cda67bafba","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Profiling headers are overrident to take in account this new"},{"line_number":45,"context_line":"        # context/span."},{"line_number":46,"context_line":"        request.headers.update("},{"line_number":47,"context_line":"            web.get_trace_id_headers())"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        response \u003d _FUNC(self, request, *args, **kwargs)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"8ac6333e_42182787","line":47,"range":{"start_line":47,"start_character":16,"end_line":47,"end_character":36},"in_reply_to":"e7199b50_203e86a7","updated":"2023-04-25 09:12:42.000000000","message":"Done","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"0f84e321b9fcc989a2fbd7ca23804568a3fbfa62","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        HTTPAdapter.send \u003d send"},{"line_number":62,"context_line":"        LOG.debug(\"profiling requests enabled\")"},{"line_number":63,"context_line":"    else:"},{"line_number":64,"context_line":"        LOG.info(\"unable to activate profiling for requests, \""},{"line_number":65,"context_line":"                 \"please ensure that python requests is installed.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"47525ddc_9c8c514d","line":64,"range":{"start_line":64,"start_character":12,"end_line":64,"end_character":16},"updated":"2023-04-11 12:21:21.000000000","message":"this probably should be warning because the profiler was not installed while user requested it ?","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9890b5a58349b172babfdf90c685b6cda67bafba","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        HTTPAdapter.send \u003d send"},{"line_number":62,"context_line":"        LOG.debug(\"profiling requests enabled\")"},{"line_number":63,"context_line":"    else:"},{"line_number":64,"context_line":"        LOG.info(\"unable to activate profiling for requests, \""},{"line_number":65,"context_line":"                 \"please ensure that python requests is installed.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"f37b3134_e4f38cdb","line":64,"range":{"start_line":64,"start_character":12,"end_line":64,"end_character":16},"in_reply_to":"47525ddc_9c8c514d","updated":"2023-04-25 09:12:42.000000000","message":"Done","commit_id":"70f50721c6476af60c4a1aae45d15bba70f2e133"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9a99ddd520b34dd41579e5101b55fa4573bd6653","unresolved":true,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def enable():"},{"line_number":68,"context_line":"    if _FUNC:"},{"line_number":69,"context_line":"        HTTPAdapter.send \u003d send"},{"line_number":70,"context_line":"        LOG.debug(\"profiling requests enabled\")"},{"line_number":71,"context_line":"    else:"},{"line_number":72,"context_line":"        LOG.warning(\"unable to activate profiling for requests, \""}],"source_content_type":"text/x-python","patch_set":11,"id":"d500c2c4_524c120b","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":31},"updated":"2023-05-23 08:55:53.000000000","message":"Just a `reader` comment.\n\nCan\u0027t we do that directly from line 63?\nThat\u0027s a bit redundant with what its did in the else section of the above `try/except`, and as `else` part is only executed if the `try` part is successful and that the import of `requests` is also successful, so I\u0027d suggest to init everything in the `else` part.\n\nThe `enable` function part would be only the confirmation to the user that http adapter is fully ready to be used by checking the state of `_FUNC` as you already did.","commit_id":"196c9b53145e38a82ed2eead53b4d4aef3a8de66"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"cf6380fb0e6777485604b4672bc6fdb655315c53","unresolved":true,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def enable():"},{"line_number":68,"context_line":"    if _FUNC:"},{"line_number":69,"context_line":"        HTTPAdapter.send \u003d send"},{"line_number":70,"context_line":"        LOG.debug(\"profiling requests enabled\")"},{"line_number":71,"context_line":"    else:"},{"line_number":72,"context_line":"        LOG.warning(\"unable to activate profiling for requests, \""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a809511_140a124a","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":31},"in_reply_to":"d500c2c4_524c120b","updated":"2023-06-06 08:19:34.000000000","message":"I think the point is that we need the warning message in case the user explicitly requests the profiling for requests. Because the whole enable method is called by initializer according to the config knob I think it makes sense to have this logic within enable method.","commit_id":"196c9b53145e38a82ed2eead53b4d4aef3a8de66"}]}
