private static ScheduledExecutorService createExecutor() {
    return Executors.newScheduledThreadPool(1, r -> {
      Thread thread = new Thread(r, "Trace flusher");
      thread.setDaemon(true);
      return thread;
    });
  }
private static ScheduledExecutorService createExecutor()