adoroszlai commented on a change in pull request #1255: HDDS-1935. Improve the visibility with Ozone Insight tool URL: https://github.com/apache/hadoop/pull/1255#discussion_r314274453
########## File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/protocolPB/ScmBlockLocationProtocolServerSideTranslatorPB.java ########## @@ -97,15 +96,45 @@ public SCMBlockLocationResponse send(RpcController controller, SCMBlockLocationRequest request) throws ServiceException { String traceId = request.getTraceID(); + if (LOG.isTraceEnabled()) { + LOG.trace("BlockLocationProtocol {} request is received: <json>{}</json>", + request.getCmdType().toString(), + request.toString().replaceAll("\n", "\\\\n")); + + } else if (LOG.isDebugEnabled()) { + LOG.debug("BlockLocationProtocol {} request is received", + request.getCmdType().toString()); + } + + protocolMessageMetrics.increment(request.getCmdType()); + + try (Scope scope = TracingUtil + .importAndCreateScope( + "ScmBlockLocationProtocol." + request.getCmdType(), + request.getTraceID())) { + SCMBlockLocationResponse response = + processMessage(request, traceId); + + if (LOG.isTraceEnabled()) { + LOG.trace( + "BlockLocationProtocol {} request is processed. Response: " + + "<json>{}</json>", + request.getCmdType().toString(), + request.toString().replaceAll("\n", "\\\\n")); Review comment: ```suggestion response.toString().replaceAll("\n", "\\\\n")); ``` Although response is already logged in `processMessage()`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org