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:03:02 UTC

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

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_r280001683
 
 

 ##########
 File path: zipkin-collector/scribe/src/main/java/zipkin2/collector/scribe/ScribeSpanConsumer.java
 ##########
 @@ -42,22 +43,23 @@
   }
 
   @Override
-  public ListenableFuture<ResultCode> log(List<LogEntry> messages) {
+  public ListenableFuture<ResultCode> log(List<LogEntry> logEntries) {
     metrics.incrementMessages();
-    List<Span> spans;
+    List<Span> spans = new ArrayList<>();
+    int byteCount = 0;
     try {
-      spans =
-          messages
-              .stream()
-              .filter(m -> m.category.equals(category))
-              .map(m -> m.message.getBytes(StandardCharsets.ISO_8859_1))
-              .map(b -> Base64.getMimeDecoder().decode(b)) // finagle-zipkin uses mime encoding
-              .peek(b -> metrics.incrementBytes(b.length))
 
 Review comment:
   this logic was plain wrong

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