@Override
  public synchronized void close() {
    REGISTERED_FLUSHERS.remove(this);
    if (scheduledFuture != null) {
      //both .close() and .run() are synchronized => cancel() here can't race with re-scheduling inside .run()
      scheduledFuture.cancel(true);
      scheduledFuture = null;
    }
    if (otelMonitoringHandle != null) {
      otelMonitoringHandle.close();
    }
  }
@Override
  public synchronized void close()