code: @MustBeClosed
    public static Scope withScope(ServletRequest request) {
      checkNotNull(request, "request");
      OcHttpServletListener listener =
          (OcHttpServletListener) request.getAttribute(OPENCENSUS_SERVLET_LISTENER);
      if (listener != null) {
        return listener.withSpan();
      }
      return Tracing.getTracer().withSpan(BlankSpan.INSTANCE);
    }
docs: Enters the scope of code where the given {@link ServletRequest} will be processed and returns
  an object that represents the scope. The scope is exited when the returned object is closed. A
  span created for the {@link ServletRequest} is set to the current Context.
  
  <p>Supports try-with-resource idiom.
  
  <p>Example of usage:
  
  <pre>{@code
  void AsyncRequestProcessor(AsyncContext asyncCtx) {
  try (Scope ws = OcHttpServletUtil.withScope(asyncCtx.getRequest) {
  tracer.getCurrentSpan().addAnnotation("my annotation");
  doSomeOtherWork();  // Here "span" is the current Span.
  }
  }
  }</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
  void AsyncRequestProcessor(AsyncContext asyncCtx) {
  Scope ws = OcHttpServletUtil.withScope(asyncCtx.getRequest)
  try {
  tracer.getCurrentSpan().addAnnotation("my annotation");
  doSomeOtherWork();  // Here "span" is the current Span.
  } finally {
  ws.close();
  }
  }
  }</pre>
  
  @param request The {@link ServletRequest} request that is about to be processed.
  @return an object that defines a scope where the span associated with the given {@link
  ServletRequest} will be set to the current Context.
  @throws NullPointerException if {@code request} is {@code null}.
  @since 0.20.0