You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/04/11 06:22:10 UTC

[incubator-skywalking] branch master updated: Fixed Failure of Enhanced Kafka Interceptor to Acquire SkyWalking DynamicField (#2470)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new a0ef72c  Fixed Failure of Enhanced Kafka Interceptor to Acquire SkyWalking DynamicField (#2470)
a0ef72c is described below

commit a0ef72cf8b7f482d4a8bfa497a33f7306855512e
Author: Wilt <15...@163.com>
AuthorDate: Thu Apr 11 14:22:02 2019 +0800

    Fixed Failure of Enhanced Kafka Interceptor to Acquire SkyWalking DynamicField (#2470)
---
 .../apache/skywalking/apm/plugin/kafka/v1/CallbackInterceptor.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apm-sniffer/apm-sdk-plugin/kafka-v1-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/v1/CallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/kafka-v1-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/v1/CallbackInterceptor.java
index 3d3f38e..8e38bd9 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-v1-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/v1/CallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-v1-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/v1/CallbackInterceptor.java
@@ -34,7 +34,9 @@ public class CallbackInterceptor implements InstanceMethodsAroundInterceptor {
 
         //Get the SnapshotContext
         ContextSnapshot contextSnapshot = (ContextSnapshot)objInst.getSkyWalkingDynamicField();
-        ContextManager.continued(contextSnapshot);
+        if (null != contextSnapshot) {
+            ContextManager.continued(contextSnapshot);
+        }
     }
 
     @Override