)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4a7a1decf62f5dbdee707e1a0d0e18afdd7adc03","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"c8ac1bd4_a0c0e831","line":10,"updated":"2022-04-15 13:55:20.000000000","message":"Do you mind elaborating this ? As far as I\u0027ve searched, I could not find any service overriding default logging_context_format_string.\nSo updated default in oslo.context is \"propageted\" to each services.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"920aab74aa13d7d7f2c9fee02157921974d76b8f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"6cd51f0d_dfb3ab1b","line":10,"in_reply_to":"061eb976_43fbfbd3","updated":"2022-04-15 14:07:38.000000000","message":"also note, that if some service changes its custom formatter context string or if default value in oslo changes, that change would have to be reflected over each of the aforementioned customizations. While with this change, users would have to change nothing, the keys will be smart added from the context dictionaries of services","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"a796e92351c75fd42cae05c953cb02478403e7b0","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"cd7587bc_7981dc3c","line":10,"in_reply_to":"4d243521_8e63a486","updated":"2022-04-15 14:30:39.000000000","message":"With this change, the modification process would be for each service:\n\n1) set logging_context_add_from\u003d[context_key_foo, bar]\n2) do not care about merging those with anything of the default formatters in oslo\n3) do not care about merging those with anything of the (possibly) overriden formatters in service configs via the service code changes or external config managment systems\n4) ??? (send SIGHUP)\n5) PROFIT (see the change applied)\n\nWithout this patch the process is:\n1) set logging_context_format_string to (if it is still actual by now?)\n%(asctime)s.%(msecs)03d %(process)d %(levelname)s \u0027\n\u0027%(name)s [%(request_id)s %(context_key_foo)s %(bar)s %(user_identity)s] \u0027\n\u0027%(instance)s%(message)s\u0027\n2) make sure that doesn\u0027t change the oslo defaults, if changed\n3) make sure that doesn\u0027t change the service code defaults, if it overrides it\n4) make sure that doesn\u0027t change external config management systems customizations\n5) send sighup, see the change applied\n\n... \nrepeat for each service","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"568a9ebc6a596740753374e40c3c316dcadd5bc1","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"4d243521_8e63a486","line":10,"in_reply_to":"6cd51f0d_dfb3ab1b","updated":"2022-04-15 14:20:11.000000000","message":"Hmm... if my observation is correct, at this moment no service actually overrides default value. I could not yet find any actual example that additional effort is required, and default change is \"propagated\" to the all services, unless user intentionally set the parameter by themselves.\n\nThe global_request_id feature is global, updating the root default would make sense.\n\nEven if we add this parameter we need to set this parameter likely in every services. I don\u0027t see quite much more benefit than setting logging_context_format_string in every service while the current parameter is quite tricky and too much intentional to inject global request id despite of the naming which sounds like global user (I\u0027d need to discuss this with Herve)","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"c10f3eb83a0f4e1910246d296688d979766f471f","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"061eb976_43fbfbd3","line":10,"in_reply_to":"8669e6ef_7d70331c","updated":"2022-04-15 14:05:26.000000000","message":"...or at least without bringing all the whole \"%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s\" thing for each service config, but added the extra context keys.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"d376faea3dcb10e6c6fb4d2c6e0919e4fdfe5e9e","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"8669e6ef_7d70331c","line":10,"in_reply_to":"c8ac1bd4_a0c0e831","updated":"2022-04-15 14:03:58.000000000","message":"If you look by https://codesearch.opendev.org/?q\u003dlogging_context_format_string\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003d\nyou\u0027ll find out that each openstack service defaults that to its preferred choise. So there is no good and flexible way for operators to add extra formatter keys from the context data for all services at once, without going and overriding the whole logging_context_format_string for each service.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3726a15bf169c83a126d1c421246be6e1220195e","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"f9989a1b_dab83273","line":10,"in_reply_to":"cd7587bc_7981dc3c","updated":"2022-04-15 14:36:12.000000000","message":"Even if you use this additinal parameter you need to care about consistency with the latest default of logging_context_format_string.\nIn case the default is updated and global_request_id is added then you need to update your own string to avoid duplicate global_request_id.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"27d2b8cbfd250da20bbbc2bbc9886618a6ff4a5f","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff68ae21_8bc83e60","line":10,"in_reply_to":"f9989a1b_dab83273","updated":"2022-04-15 14:38:45.000000000","message":"... and you also need to care about your own logging_context_format_string when you add this new parameter.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"fef5abfdb36bc887ea46627ac0291b54b72774e2","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add context formatter option to log Global Req ID"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Devstack overrides [0] logging_context_format_string to show"},{"line_number":10,"context_line":"global_request_id in CI. Modifying context formatters is not"},{"line_number":11,"context_line":"an ideal solution as it requires repeating the service specific"},{"line_number":12,"context_line":"context formatters to reconfigure each particular service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"57736dfe_56e40247","line":10,"in_reply_to":"ff68ae21_8bc83e60","updated":"2022-04-15 14:58:04.000000000","message":"FWIW, this limits the control over changing formatters to the context placed into [] section. There could be follow-up to refactor the context formatter to be built fully dynamically, including request_id user_id etc. Like by placing those to the new default value of this new parameter.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"850e72022a03a14b55bebbc62253a2c519ef80af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5b051766_308ee3d3","updated":"2022-03-17 09:27:43.000000000","message":"it doesn\u0027t work, early WIP, looking for inputs on the idea and how to really make it working...","commit_id":"8582122f3b4cc53db97fdbe4f58a4fe0a1232058"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"398283c808a9af65ccb2d33856df89181b31af09","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"870e8899_d56e5fff","updated":"2022-03-18 14:19:49.000000000","message":"@Sean, as an author of nearby code strings :), could you please help with this change request?\nWhere this formatter method is executed? Some adhoc testing on a test env shows changing config option and restarting a service does not apply the context formatter change","commit_id":"0be25f08c3ef99e7b46412df195a47d5baa16ff4"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"351da035a4a85daf0f2d55511e230af4b9ded1d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"460b49e1_d791d739","updated":"2022-03-18 14:23:30.000000000","message":"^^stephenfin perchance please?","commit_id":"0be25f08c3ef99e7b46412df195a47d5baa16ff4"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"1fd914c7b5c0fc370e59e1a151017d495b7e3b23","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b97c80ce_cb7c2321","updated":"2022-03-18 14:39:00.000000000","message":"nvm, I can see it is triggered, just some issues with that code","commit_id":"0be25f08c3ef99e7b46412df195a47d5baa16ff4"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"2d583bc882b1982d13f1c81f6692adc6ddc63035","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a6cccdd9_76c1c857","updated":"2022-03-18 14:48:27.000000000","message":"it should be fine now, just not sure how to test a log config change properly","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"76dbb5f3192bcf998dc343fee44c676bc66dbe53","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f8df123f_2c9c1d72","updated":"2022-03-22 09:38:00.000000000","message":"recheck","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"6bb5b30d213c32954e86dca63cf28fae05a5d271","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b15b6dc7_15b2b4e1","updated":"2022-04-07 07:59:37.000000000","message":"Do you think such a parameter makes sense?\nI think that provides a more flexible (compared to services specific context formatters) to control\nthat global req_ids context logging behavior centrally for all services that enable that param?","commit_id":"2d0392f4fa9038f09f4383913d8917a8e5402be2"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"8f63d732c6be82f1686e6cb028b77f8f27286531","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5df47169_c889764c","updated":"2022-03-30 09:06:36.000000000","message":"PTAL","commit_id":"2d0392f4fa9038f09f4383913d8917a8e5402be2"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e32bb7b7ff4d1b44e2ed87b12d796a1643a82939","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"49b2d7f6_66ed34c5","in_reply_to":"b15b6dc7_15b2b4e1","updated":"2022-04-08 15:15:00.000000000","message":"Yes that looks promising","commit_id":"2d0392f4fa9038f09f4383913d8917a8e5402be2"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"861a48b7bfad127450890c92682dc0c9f2f2699d","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"01b04fbe_deadcf29","updated":"2022-04-15 15:32:23.000000000","message":"I\u0027m still not fully for this parameter.\n\nI\u0027ve submitted a patch[1] to update default log format and still believe that is more simple approach.\n\nHowever if we all agree adding this parameter is something useful then I don\u0027t block this.\n\nBefore we merge this, as a person who spent huge time to understand what each parameter means, I\u0027d still believe the current parameter name should be updated and would disagree with the feedback previously made.\n\n[1] https://review.opendev.org/c/openstack/oslo.log/+/838190\n\n@Herve Do you mind checking my comment inline ?","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"af8288b9db9aa20798770d294d7292b9760af4b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"065ea86a_a4780beb","updated":"2022-04-14 08:49:38.000000000","message":"PTAL","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"bf5d48ebe603bee14ee8214fde2d55b3f3201ee2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"6aab81ac_a0c12a72","updated":"2022-04-08 15:24:46.000000000","message":"PTAL. I think this is a nice addition for dynamic context formatters, which works with default context formatter strings as well.\n\nI tested it manually, for Nova, on standalone tripleo env:\n\n[root@standalone zuul]# curl -g -i -X GET http://192.168.24.3:8774/v2.1/servers/$id -H \"X-Auth-Token: $token\" -H \"X-Openstack-Request-Id: req-3dccb8c4-08fe-4706-a91d-e843b8fe9ed2\" -H \"OpenStack-API-Version: compute 2.79\" -H \"X-OpenStack-Nova-API-Version: 2.79\"\n...\nx-openstack-request-id: req-3cef0c04-3f75-448a-8b82-5dde574e239c\nx-compute-request-id: req-3cef0c04-3f75-448a-8b82-5dde574e239c\n...\n\nAnd in the nova_api.log there have been expected global and local (req-3cef0c04-3f75-448a-8b82-5dde574e239c) request ids shown (and user_identity has been expanded as well, so it got logged twice, but that\u0027s fine since just testing it):\n\n2022-04-08 14:43:33.614 17 DEBUG nova.api.openstack.wsgi_app [-] logging_context_add_from       \u003d [\u0027global_request_id\u0027, \u0027user_identity\u0027, \u0027foo\u0027] log_opt_values /usr/lib/python3.9\n/site-packages/oslo_config/cfg.py:2602\n...\n2022-04-08 15:10:35.344 17 DEBUG nova.api.openstack.wsgi [req-3dccb8c4-08fe-4706-a91d-e843b8fe9ed2 f8d51cfd13364657b2ae325aa3bee1be f7ce5fae7a0d42cf8ce06e1c375af7f8 - default default req-3cef0c04-3f75-448a-8b82-5dde574e239c f8d51cfd13364657b2ae325aa3bee1be f7ce5fae7a0d42cf8ce06e1c375af7f8 - default default] Calling method \u0027\u003cbound method ServersController.show...\n\nCompare this to another setting (logging_context_add_from\u003dfoo)\n... (same CLI command) ...\nx-openstack-request-id: req-5f01ca21-d1f1-4d3b-843b-2bc08b0f5586\nx-compute-request-id: req-5f01ca21-d1f1-4d3b-843b-2bc08b0f5586\n\nnova_api.log:\n2022-04-08 15:19:32.104 17 DEBUG nova.api.openstack.wsgi [req-5f01ca21-d1f1-4d3b-843b-2bc08b0f5586 f8d51cfd13364657b2ae325aa3bee1be f7ce5fae7a0d42cf8ce06e1c375af7f8 - default default] Calling method \u0027\u003cbound method ServersController.show","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"a6258c4f770039736e74c6ef94fa5fbe5c3c46cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"91e373d0_ab9b18fb","updated":"2022-04-19 07:26:33.000000000","message":"Thank you, either of the approaches would work for me","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e32bb7b7ff4d1b44e2ed87b12d796a1643a82939","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"e006ef1d_0df1cabb","updated":"2022-04-08 15:15:00.000000000","message":"Thanks for your latest patch sets!\n\nOnly +1 by waiting for the CI.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"56fc555578b5b38f4ceed5a9538777cf709fd5b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3944fe97_dc0abb7e","updated":"2022-04-13 13:00:50.000000000","message":"could you please merge that?","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"a0dd192f4610948d165e8fdf41552cb2d9510378","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"67644f56_1dd3c2ba","in_reply_to":"01b04fbe_deadcf29","updated":"2022-04-19 07:56:13.000000000","message":"I agree with Takashi the adding of this parameter is a bit redundante with `logging_context_format_string` and adding the global_request_id by default into `logging_context_format_string` doesn\u0027t shock me.\n\n@Bogdan: I\u0027d suggest to rather follow Takashi\u0027s track. Anyway, thank you for proposing these changes.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"ff25ceac0e905036dd56996b6c8dfa30d71b02ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"52014ce0_5b1d1851","in_reply_to":"67644f56_1dd3c2ba","updated":"2022-04-21 07:53:44.000000000","message":"Ack","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"}],"oslo_log/_options.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"2522845cffd8171cd4f28db70f220c092ce17457","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.BoolOpt(\u0027log_global_request_id\u0027,"},{"line_number":183,"context_line":"                default\u003dFalse,"},{"line_number":184,"context_line":"                help\u003d\u0027Log Global Request ID alongside request_id in context.\u0027),"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # NOTE(mikal): there are two options here because sometimes we are handed"},{"line_number":187,"context_line":"    # a full instance (and could include more information), and other times we"}],"source_content_type":"text/x-python","patch_set":4,"id":"442199cf_37ef6a1e","line":184,"range":{"start_line":182,"start_character":4,"end_line":184,"end_character":79},"updated":"2022-03-18 16:21:16.000000000","message":"Well, I think oslo.log should stay agnostic to data shared by services. So Instead of hard coding the `global_request_id` notion here, why not simply adding a new option that could accept a list of arguments where we can pass by example `global_request_id` and then retrieve it from the record dict and then log it.\n\nThat would allow us to also print other data without modifying oslo log each 2 minutes.\n\nAn other alternative could be by example to define this option and initiate it with a list of default values to log that could contains the `global_request_id`. The lib will remains more agnostic than with an hard coded parameter and will share a global context with all the services through these default values that could be overriden.\n\nThoughts?","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"aeac8499191bae94b146e43711463651193d75d5","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.BoolOpt(\u0027log_global_request_id\u0027,"},{"line_number":183,"context_line":"                default\u003dFalse,"},{"line_number":184,"context_line":"                help\u003d\u0027Log Global Request ID alongside request_id in context.\u0027),"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # NOTE(mikal): there are two options here because sometimes we are handed"},{"line_number":187,"context_line":"    # a full instance (and could include more information), and other times we"}],"source_content_type":"text/x-python","patch_set":4,"id":"e315b915_4d5d85ef","line":184,"range":{"start_line":182,"start_character":4,"end_line":184,"end_character":79},"in_reply_to":"3adca13d_3ff15581","updated":"2022-04-08 14:02:11.000000000","message":"DONE","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"4075290fd0903521bc8e496a4ea5c506106122ad","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.BoolOpt(\u0027log_global_request_id\u0027,"},{"line_number":183,"context_line":"                default\u003dFalse,"},{"line_number":184,"context_line":"                help\u003d\u0027Log Global Request ID alongside request_id in context.\u0027),"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # NOTE(mikal): there are two options here because sometimes we are handed"},{"line_number":187,"context_line":"    # a full instance (and could include more information), and other times we"}],"source_content_type":"text/x-python","patch_set":4,"id":"d1c50003_5b89422f","line":184,"range":{"start_line":182,"start_character":4,"end_line":184,"end_character":79},"in_reply_to":"442199cf_37ef6a1e","updated":"2022-03-21 08:24:58.000000000","message":"That makes sense, although there oslo.log looks already global_request_id aware today. Also, the context-or-not logging formatter selection is already there, this change only extends it. I think what you describe is already there - the context string formatter. I don\u0027t think there is a need in another one, if users know, what and there to log, they should use that formatter string. It is unlikely that those \"what and where\" would be generic for all services though. Rather it would be runed in each searvice config. So, no, I don\u0027t think we need to bring it here, in oslo.log. Knowing this particular case, global_request_id, is common for all services and is enough to be covered here like this.","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"4c4e59f592a1af6f39a6c69a394c2440661b4b56","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.BoolOpt(\u0027log_global_request_id\u0027,"},{"line_number":183,"context_line":"                default\u003dFalse,"},{"line_number":184,"context_line":"                help\u003d\u0027Log Global Request ID alongside request_id in context.\u0027),"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # NOTE(mikal): there are two options here because sometimes we are handed"},{"line_number":187,"context_line":"    # a full instance (and could include more information), and other times we"}],"source_content_type":"text/x-python","patch_set":4,"id":"3adca13d_3ff15581","line":184,"range":{"start_line":182,"start_character":4,"end_line":184,"end_character":79},"in_reply_to":"d1c50003_5b89422f","updated":"2022-04-08 10:43:39.000000000","message":"I think I got that you mean","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e32bb7b7ff4d1b44e2ed87b12d796a1643a82939","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.BoolOpt(\u0027log_global_request_id\u0027,"},{"line_number":183,"context_line":"                default\u003dFalse,"},{"line_number":184,"context_line":"                help\u003d\u0027Log Global Request ID alongside request_id in context.\u0027),"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # NOTE(mikal): there are two options here because sometimes we are handed"},{"line_number":187,"context_line":"    # a full instance (and could include more information), and other times we"}],"source_content_type":"text/x-python","patch_set":4,"id":"86cac609_2b25a704","line":184,"range":{"start_line":182,"start_character":4,"end_line":184,"end_character":79},"in_reply_to":"e315b915_4d5d85ef","updated":"2022-04-08 15:15:00.000000000","message":"The latest version of these changes looks sensible. LGTM","commit_id":"4a0500e6385bce8d24cef523f29933f7b21b4a12"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4a7a1decf62f5dbdee707e1a0d0e18afdd7adc03","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.ListOpt(\u0027logging_context_add_from\u0027,"},{"line_number":183,"context_line":"                default\u003d[],"},{"line_number":184,"context_line":"                help\u003d\u0027Log extra context values alongside request_id.\u0027),"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"eefff43b_b44dc73c","line":182,"range":{"start_line":182,"start_character":17,"end_line":182,"end_character":41},"updated":"2022-04-15 13:55:20.000000000","message":"IMHO this parameter name is really confusing. This actually inject some context after global id while the parameter name indicates this affects the whole context information.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"861a48b7bfad127450890c92682dc0c9f2f2699d","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.ListOpt(\u0027logging_context_add_from\u0027,"},{"line_number":183,"context_line":"                default\u003d[],"},{"line_number":184,"context_line":"                help\u003d\u0027Log extra context values alongside request_id.\u0027),"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"57529d7a_f4d62f70","line":182,"range":{"start_line":182,"start_character":17,"end_line":182,"end_character":41},"in_reply_to":"0522c0bc_7b823fa1","updated":"2022-04-15 15:32:23.000000000","message":"I\u0027d like to request Herve to revisit this. The current logic of this is quite specific to request id as it injects additonal field just after request id.\n\nSo IMO this parameter should have more specific name, like logging_extra_request_identity_format.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"b1f51b10340f827f78a218e0d31c979b58c9439f","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.ListOpt(\u0027logging_context_add_from\u0027,"},{"line_number":183,"context_line":"                default\u003d[],"},{"line_number":184,"context_line":"                help\u003d\u0027Log extra context values alongside request_id.\u0027),"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"0522c0bc_7b823fa1","line":182,"range":{"start_line":182,"start_character":17,"end_line":182,"end_character":41},"in_reply_to":"5fabf4f9_2392cba5","updated":"2022-04-15 14:00:01.000000000","message":"\u0027from\u0027 indicates to add given keys FROM the context dict\nI couldn\u0027t think of a better naming, sorry","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1bb04c5ce9b3ff2468c0da58f01fde826185bef6","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    cfg.BoolOpt(\u0027publish_errors\u0027,"},{"line_number":180,"context_line":"                default\u003dFalse,"},{"line_number":181,"context_line":"                help\u003d\u0027Enables or disables publication of error events.\u0027),"},{"line_number":182,"context_line":"    cfg.ListOpt(\u0027logging_context_add_from\u0027,"},{"line_number":183,"context_line":"                default\u003d[],"},{"line_number":184,"context_line":"                help\u003d\u0027Log extra context values alongside request_id.\u0027),"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5fabf4f9_2392cba5","line":182,"range":{"start_line":182,"start_character":17,"end_line":182,"end_character":41},"in_reply_to":"eefff43b_b44dc73c","updated":"2022-04-15 13:57:41.000000000","message":"\u003e  This actually inject some context after global id \n\nLet me fix some typos and rephrase this to clarify my point.\n\nThis actually inject some context elements after request id. The parameter name sounds like this appends something to the whole context storing.\n\n\nIn addition, for me it\u0027s not clear what \"from\" indicates here.","commit_id":"453100130d71d72340c1e66e7af6591a3c729842"}]}
