You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zipkin.apache.org by GitBox <gi...@apache.org> on 2019/05/01 04:13:22 UTC

[GitHub] [incubator-zipkin] Logic-32 commented on a change in pull request #2552: Fixes logging and metrics for collectors

Logic-32 commented on a change in pull request #2552: Fixes logging and metrics for collectors
URL: https://github.com/apache/incubator-zipkin/pull/2552#discussion_r280002346
 
 

 ##########
 File path: zipkin-collector/core/src/main/java/zipkin2/collector/Collector.java
 ##########
 @@ -110,34 +119,46 @@ public void accept(List<Span> spans, Callback<Void> callback) {
     }
 
     try {
+      // adding a separate callback intentionally decouples collection from storage
       record(sampled, acceptSpansCallback(sampled));
       callback.onSuccess(null);
-    } catch (RuntimeException e) {
-      callback.onError(errorStoringSpans(sampled, e));
-      return;
+    } catch (RuntimeException | Error e) {
+      handleStorageError(spans, e, callback);
 
 Review comment:
   Technically speaking, isn't this still a "Collector error" at this point?  Since `record()` is async, the "storage error" doesn't happen until later.  Arguably, we may want to handle them the same way but I wanted to bring up the potential issue just in case.

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


With regards,
Apache Git Services