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/12 11:20:35 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #5304: Support @KafkaPollAndInvoke annotation to replace @Trace when just using the Kafka scenario agent plugin

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



##########
File path: apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/KafkaConsumerInterceptor.java
##########
@@ -66,9 +66,10 @@ public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allA
         //
         if (records.size() > 0) {
             ConsumerEnhanceRequiredInfo requiredInfo = (ConsumerEnhanceRequiredInfo) objInst.getSkyWalkingDynamicField();
-            if (ContextManager.getRuntimeContext().get(Constants.SPRING_KAFKA_FLAG) != null) {
-                ContextManager.createEntrySpan(Constants.SPRING_KAFKA_POLL_AND_INVOKE_OPERATION_NAME, null);
-                ((SpringKafkaContext) ContextManager.getRuntimeContext().get(Constants.SPRING_KAFKA_FLAG)).setNeedStop(true);
+            KafkaContext context = (KafkaContext) ContextManager.getRuntimeContext().get(Constants.KAFKA_FLAG);
+            if (context != null) {
+                ContextManager.createEntrySpan(context.getOperationName(), null);

Review comment:
       No Context Carrier?




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