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 2020/08/30 00:05:56 UTC

[GitHub] [skywalking] xbkaishui commented on a change in pull request #5412: #5311 Fix ActiveMQ NullPointerException

xbkaishui commented on a change in pull request #5412:
URL: https://github.com/apache/skywalking/pull/5412#discussion_r479702699



##########
File path: apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnExceptionInterceptor.java
##########
@@ -34,15 +34,22 @@
 public class OnExceptionInterceptor implements InstanceMethodsAroundInterceptor {
 
     public static final String CALLBACK_OPERATION_NAME_PREFIX = "RocketMQ/";
+    private static final String DEFAULT_TOPIC = "no_topic";
 
     @Override
     public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
         MethodInterceptResult result) throws Throwable {
         SendCallBackEnhanceInfo enhanceInfo = (SendCallBackEnhanceInfo) objInst.getSkyWalkingDynamicField();
-        AbstractSpan activeSpan = ContextManager.createLocalSpan(CALLBACK_OPERATION_NAME_PREFIX + enhanceInfo.getTopicId() + "/Producer/Callback");
+        String topicId = DEFAULT_TOPIC;
+        if (enhanceInfo != null) {

Review comment:
       done




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