wu-sheng commented on a change in pull request #6918:
URL: https://github.com/apache/skywalking/pull/6918#discussion_r628877977



##########
File path: 
apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/MessageConstructorInterceptor.java
##########
@@ -34,6 +35,12 @@
 
     @Override
     public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
-        objInst.setSkyWalkingDynamicField(new MessageEnhanceRequiredInfo());
+        final Object msgArgument = allArguments[2];
+        if (objInst instanceof TopicMessageImpl && msgArgument instanceof 
EnhancedInstance) {

Review comment:
       Thanks. Targeting the specific classes is already a better idea, and the 
codes would be more clear and have better performance.




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


Reply via email to