void sortTreeByTimestamp(SpanNode root) {
      ArrayDeque<SpanNode> queue = new ArrayDeque<>();
      queue.add(root);

      while (!queue.isEmpty()) {
        SpanNode current = queue.pop();
        if (current.children().isEmpty()) continue;
        Collections.sort(current.children(), NODE_COMPARATOR);
        queue.addAll(current.children());
      }
    }
Sorts children at the same level by {@link Span#timestampAsLong()} ascending
zipkin/src/main/java/zipkin2/internal/SpanNode.java