zhangjidi2016 commented on a change in pull request #2598:
URL: https://github.com/apache/rocketmq/pull/2598#discussion_r563297497
##########
File path:
client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageTraceHookImpl.java
##########
@@ -60,7 +60,6 @@ public void sendMessageBefore(SendMessageContext context) {
traceBean.setStoreHost(context.getBrokerAddr());
traceBean.setBodyLength(context.getMessage().getBody().length);
traceBean.setMsgType(context.getMsgType());
-
traceBean.setClientHost(((AsyncTraceDispatcher)localDispatcher).getHostProducer().getmQClientFactory().getClientId());
Review comment:
Because the trace message is a normal message, it has BornHost itself,
this is the client IP, there is no need to add in the trace content.Simply to
display the trace data, assign the BornHost of the message to the clientHost of
the traceBean.
The BornHost of a pub Trace message is the IP of the client producer, and
the BornHost of a sub Trace message is the IP of the client consumer.
----------------------------------------------------------------
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:
[email protected]