You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/04/26 19:46:43 UTC

[GitHub] [couchdb] iilyak commented on a change in pull request #3526: Adopt structured logging via new Erlang 21 logger

iilyak commented on a change in pull request #3526:
URL: https://github.com/apache/couchdb/pull/3526#discussion_r620598792



##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -268,6 +275,11 @@ handle_request_int(MochiReq) ->
             span_ok(HttpResp),
             {ok, Resp};
         #httpd_resp{status = aborted, reason = Reason} ->
+            ?LOG_ERROR(#{
+                what => abnormal_response_termation,
+                id => get(nonce),

Review comment:
       1) I think we can use `logger:set_process_metadata(#{http_request_id => Nonce})` once on the line after we calculated `Nonce` and do not pass it explicitly everywhere. 
   
   2) I think `id` name is too generic this would make correlation of log events on the external log querying system problematic.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org