wu-sheng commented on code in PR #657:
URL: https://github.com/apache/skywalking-java/pull/657#discussion_r1419922840


##########
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:
   `msg.getData()` is a byte[]. Is here OK to use the default charset?



-- 
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