code: @MustBeClosed
    public final Scope withSpan(Span span) {
      return CurrentSpanUtils.withSpan(Utils.checkNotNull(span, "span"), /* endSpan= */ false);
    }
docs: Enters the scope of code where the given {@link Span} is in the current Context, and returns an
  object that represents that scope. The scope is exited when the returned object is closed.
  
  <p>Supports try-with-resource idiom.
  
  <p>Can be called with {@link BlankSpan} to enter a scope of code where tracing is stopped.
  
  <p>Example of usage:
  
  <pre>{@code
  private static Tracer tracer = Tracing.getTracer();
  void doWork() {
  // Create a Span as a child of the current Span.
  Span span = tracer.spanBuilder("my span").startSpan();
  try (Scope ws = tracer.withSpan(span)) {
  tracer.getCurrentSpan().addAnnotation("my annotation");
  doSomeOtherWork();  // Here "span" is the current Span.
  }
  span.end();
  }
  }</pre>
  
  <p>Prior to Java SE 7, you can use a finally block to ensure that a resource is closed
  regardless of whether the try statement completes normally or abruptly.
  
  <p>Example of usage prior to Java SE7:
  
  <pre>{@code
  private static Tracer tracer = Tracing.getTracer();
  void doWork() {
  // Create a Span as a child of the current Span.
  Span span = tracer.spanBuilder("my span").startSpan();
  Scope ws = tracer.withSpan(span);
  try {
  tracer.getCurrentSpan().addAnnotation("my annotation");
  doSomeOtherWork();  // Here "span" is the current Span.
  } finally {
  ws.close();
  }
  span.end();
  }
  }</pre>
  
  @param span The {@link Span} to be set to the current Context.
  @return an object that defines a scope where the given {@link Span} will be set to the current
  Context.
  @throws NullPointerException if {@code span} is {@code null}.
  @since 0.5