def log_async_error(e, span)
      # Asynchronous spans can persist longer than the parent
      # trace.  With the trace ID, we check the current trace
      # but otherwise, we search staged traces.

      if tracing? && self.current_trace.id == span.context.trace_id
        self.current_trace.add_async_error(e, span)
      else
        trace = ::Instana.processor.staged_trace(span.context.trace_id)
        if trace
          trace.add_async_error(e, span)
        else
          ::Instana.logger.debug "#{__method__}: Couldn't find staged trace. #{span.inspect}"
        end
      end
    end
def log_async_error(e, span)
      # Asynchronous spans can persist longer than the parent
      # trace.  With the trace ID, we check the current trace
      # but otherwise, we search staged traces.

      if tracing? && self.current_trace.id == span.context.trace_id
        self.current_trace.add_async_error(e, span)
      else
        trace = ::Instana.processor.staged_trace(span.context.trace_id)
        if trace
          trace.add_async_error(e, span)
        else
          ::Instana.logger.debug "#{__method__}: Couldn't find staged trace. #{span.inspect}"
        end
      end
    end
Add an error to an asynchronous span

 @param e [Exception] Add exception to the current span
 @param span [Span] the span for this Async op (previously returned
   from `log_async_entry`)