zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-zipkin] adriancole commented on a change in pull request #2552: Fixes logging and metrics for collectors
Date Wed, 01 May 2019 04:40:00 GMT
adriancole commented on a change in pull request #2552: Fixes logging and metrics for collectors
URL: https://github.com/apache/incubator-zipkin/pull/2552#discussion_r280004375
 
 

 ##########
 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:
   sorry it would be like instead of
   
   "Cannot store spans ... due to Error installing ES template" (or whatever the cause would
be)
   "Cannot get instance of span consumer ...
   or
   "Cannot create storage call to accept spans ...
   or
   "Cannot enqueue spans for storage...
   
   I think classifying like this would add a dozen lines of main and 3 or 4 more test cases,
but thinking right now, I'm not sure it would be terribly more helpful.

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

Mime
View raw message