wallezhang commented on a change in pull request #6918:
URL: https://github.com/apache/skywalking/pull/6918#discussion_r628876072



##########
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:
       Yes, it is indeed not stable. The specific types are also checked in the 
pulsar client code, and I think I can change the enhanced class into two 
certain types of implementors.




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