mrproliu commented on code in PR #9916:
URL: https://github.com/apache/skywalking/pull/9916#discussion_r1016031327


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TraceQueryService.java:
##########
@@ -244,4 +268,61 @@ private void findChildren(List<Span> spans, Span 
parentSpan, List<Span> children
             }
         });
     }
+
+    private void appendAttachedEventsToSpan(List<Span> spans, 
List<SpanAttachedEventRecord> events) throws InvalidProtocolBufferException {
+        if (CollectionUtils.isEmpty(events)) {
+            return;
+        }
+
+        for (SpanAttachedEventRecord record : events) {
+            if (!StringUtils.isNumeric(record.getTraceSpanId())) {
+                continue;
+            }
+
+            // find matches span
+            final int eventSpanId = Integer.parseInt(record.getTraceSpanId());

Review Comment:
   Updated. I have filtered the skywalking events in the query and checked the 
parent span ID is numeric or not.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to