code: public boolean isCurrentSpan(String id) {
          TraceState ts = traceState.get();
  
          if (id != null && ts != null) {
              boolean spanFound = ts.peekId().equals(id);
              if (log.isLoggable(Level.FINEST)) {
                  log.finest("Is current span id = " + id + "? " + spanFound);
              }
              return spanFound;
          }
  
          return false;
      }
docs: This method determines whether the current span is
  associated with the supplied id.
  
  @return Whether the current span is associated with the id