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 2022/12/19 03:18:11 UTC

[GitHub] [skywalking] wankai123 commented on a diff in pull request #10180: Fix cannot display attached events when using Zipkin Lens UI query traces

wankai123 commented on code in PR #10180:
URL: https://github.com/apache/skywalking/pull/10180#discussion_r1051757788


##########
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/handler/ZipkinQueryHandler.java:
##########
@@ -304,6 +306,16 @@ private byte[] encodeTraces(List<List<Span>> traces) {
         return buff.array();
     }
 
+    private void appendEventsToTraces(List<List<Span>> spans) throws IOException {
+        for (List<Span> span : spans) {
+            if (CollectionUtils.isEmpty(span)) {
+                continue;
+            }
+
+            appendEvents(span, getSpanAttachedEventQueryDAO().querySpanAttachedEvents(SpanAttachedEventTraceType.ZIPKIN, span.get(0).traceId()));
+        }
+    }

Review Comment:
   ```suggestion
       private void appendEventsToTraces(List<List<Span>> traces) throws IOException {
           for (List<Span> spans : traces) {
               if (CollectionUtils.isEmpty(spans)) {
                   continue;
               }
   
               appendEvents(spans, getSpanAttachedEventQueryDAO().querySpanAttachedEvents(SpanAttachedEventTraceType.ZIPKIN, spans.get(0).traceId()));
           }
       }
   ```



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

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org