private static String serialize(Span span, boolean isStart) {
      StringBuilder sb = new StringBuilder();
      sb.append("{\"name\": \"")
        .append(span.name)
        .append("\", \"cat\": \"PERF\", \"ph\": ");
      if (isStart) {
        sb.append("\"B\"");
      }
      else {
        sb.append("\"E\"");
      }
      sb.append(", \"pid\": ").append(pid)
        .append(", \"tid\": ").append(span.threadId)
        .append(", \"ts\": ");
      if (isStart) {
        sb.append(getTimeUs(span.startTimeNs));
      }
      else {
        sb.append(getTimeUs(span.finishTimeNs));
      }
      return sb.append("},\n").toString();
    }
private static String serialize(Span span, boolean isStart)