You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/05/09 11:03:08 UTC

[GitHub] [skywalking] wallezhang commented on a change in pull request #6918: fix pulsar plugin message listener error with multi partitions topic

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



##########
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:
       The enhanced class is an interface, I want to enhance all the implementation classes, but some of them are used for wrapping other implementation, so they are only distinguished by the parameters of the constructor instead of using another instrumentation definitions.




-- 
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:
users@infra.apache.org