CommissarXia commented on code in PR #657:
URL: https://github.com/apache/skywalking-java/pull/657#discussion_r1420024648


##########
apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/PulsarConsumerInterceptor.java:
##########
@@ -73,6 +75,9 @@ public void beforeMethod(EnhancedInstance objInst, Method 
method, Object[] allAr
             Tags.MQ_BROKER.set(activeSpan, serviceUrl);
             Tags.MQ_TOPIC.set(activeSpan, consumer.getTopic());
             activeSpan.setPeer(serviceUrl);
+            if (Pulsar.TRACE_MESSAGE_CONTENTS) {
+                Tags.MQ_BODY.set(activeSpan, StringUtil.cut(new 
String(msg.getData()), Pulsar.MESSAGE_CONTENTS_MAX_LENGTH));

Review Comment:
   We used the default encoding for a long time without any issues, but we are 
using Java and are unsure if other languages can execute properly. This time, I 
added the UTF-8 character set and it ran normally in our environment



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to