void stopIfRunning() {
    synchronized (getLock()) {
      if(mySpan != null) {
        mySpan.end();
      }
      if (isRunning()) {
        stop();
        return;
      }
      cancel();
    }
  }
void stopIfRunning()