code: protected void submitTraces() {
          if (!traces.isEmpty()) {
              // Locally store list and create new list for subsequent traces
              List<Trace> toSend = traces;
              traces = new ArrayList<>(batchSize + 1);
  
              executor.execute(new Runnable() {
                  @Override
                  public void run() {
                      try {
                          tracePublisher.publish(tenantId, toSend);
                      } catch (Exception e) {
                          // TODO: Retain for retry
                          log.log(Level.SEVERE, "Failed to publish traces", e);
                      }
                  }
              });
          }
      }
docs: This method submits the current list of traces