drpmma commented on code in PR #8290: URL: https://github.com/apache/rocketmq/pull/8290#discussion_r1637430866
########## client/src/main/java/org/apache/rocketmq/client/trace/TraceBean.java: ########## @@ -37,6 +37,15 @@ public class TraceBean { private String transactionId; private boolean fromTransactionCheck; + static { + byte[] ip = UtilAll.getIP(); + if (UtilAll.isInternalIP(ip)) { + LOCAL_ADDRESS = UtilAll.ipToIPv4Str(ip); + } else { + LOCAL_ADDRESS = UtilAll.ipToIPv6Str(ip); Review Comment: Not being an internal IP does not necessarily mean it's an IPv6 IP. -- 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. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org