public static byte[] serialize(@NotNull Collection<SpanData> spanData) {
    try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
      serializeIntoProtobuf(spanData, outputStream);
      return outputStream.toByteArray();
    }
    catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
public static byte[] serialize(@NotNull Collection<SpanData> spanData)