code: public Span getSpan() {
          TraceState ts = traceState.get();
  
          if (ts != null) {
              Span span = ts.peekSpan();
              if (log.isLoggable(Level.FINEST)) {
                  log.finest("Get span = " + span + " trace state = " + ts);
              }
              return span;
          }
  
          if (log.isLoggable(Level.FINEST)) {
              log.finest("Get span requested, but no trace state");
          }
          return null;
      }
docs: This method retrieves the current span, if available.
  
  @return The current span, or null if not defined