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/02 05:06:42 UTC

[GitHub] [skywalking] muse-dev[bot] commented on a change in pull request #5623: add log when report error is occurred.

muse-dev[bot] commented on a change in pull request #5623:
URL: https://github.com/apache/skywalking/pull/5623#discussion_r498620135



##########
File path: apm-sniffer/optional-reporter-plugins/kafka-reporter-plugin/src/main/java/org/apache/skywalking/apm/agent/core/kafka/KafkaServiceManagementServiceClient.java
##########
@@ -106,7 +109,14 @@ public void run() {
         if (LOGGER.isDebugEnable()) {
             LOGGER.debug("Heartbeat reporting, instance: {}", ping.getServiceInstance());
         }
-        producer.send(new ProducerRecord<>(topic, ping.getServiceInstance(), Bytes.wrap(ping.toByteArray())));
+        producer.send(

Review comment:
       *FutureReturnValueIgnored:*  Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.

##########
File path: apm-sniffer/optional-reporter-plugins/kafka-reporter-plugin/src/main/java/org/apache/skywalking/apm/agent/core/kafka/KafkaServiceManagementServiceClient.java
##########
@@ -93,7 +94,9 @@ public void boot() {
                                                             Config.OsInfo.IPV4_LIST_SIZE))
                                                         .addAllProperties(SERVICE_INSTANCE_PROPERTIES)
                                                         .build();
-        producer.send(new ProducerRecord<>(topic, TOPIC_KEY_REGISTER + instance.getServiceInstance(), Bytes.wrap(instance.toByteArray())));
+        producer.send(new ProducerRecord<>(topic, TOPIC_KEY_REGISTER + instance.getServiceInstance(),

Review comment:
       *FutureReturnValueIgnored:*  Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.

##########
File path: apm-sniffer/optional-reporter-plugins/kafka-reporter-plugin/src/main/java/org/apache/skywalking/apm/agent/core/kafka/KafkaTraceSegmentServiceClient.java
##########
@@ -78,7 +79,11 @@ public void afterFinished(final TraceSegment traceSegment) {
             upstreamSegment.getTraceSegmentId(),
             Bytes.wrap(upstreamSegment.toByteArray())
         );
-        producer.send(record);
+        producer.send(record, (metadata, exception) -> {

Review comment:
       *FutureReturnValueIgnored:*  Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.




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