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/10/14 01:31:37 UTC

[GitHub] [skywalking] nileblack commented on a change in pull request #5660: Fix Kafka sender blocks main thread

nileblack commented on a change in pull request #5660:
URL: https://github.com/apache/skywalking/pull/5660#discussion_r504346170



##########
File path: apm-sniffer/optional-reporter-plugins/kafka-reporter-plugin/src/main/java/org/apache/skywalking/apm/agent/core/kafka/KafkaTraceSegmentServiceClient.java
##########
@@ -72,13 +119,7 @@ public void afterFinished(final TraceSegment traceSegment) {
             LOGGER.debug("Trace[TraceId={}] is ignored.", traceSegment.getTraceSegmentId());

Review comment:
       previous version is better?
   ```
       @Override
       public void afterFinished(TraceSegment traceSegment) {
           if (traceSegment.isIgnore()) {
               LOGGER.debug("Trace[TraceId={}] is ignored.", traceSegment.getTraceSegmentId());
               return;
           }
           if (!carrier.produce(traceSegment)) {
               if (LOGGER.isDebugEnable()) {
                   LOGGER.debug("One trace segment has been abandoned, cause by buffer is full.");
               }
           }
       }
   ```




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