def new_span(name, kvs = nil, start_time = ::Instana::Util.now_in_ms, child_of = nil)
      return unless @current_span

      if child_of && child_of.is_a?(::Instana::Span)
        new_span = Span.new(name, @id, parent_id: child_of.id, start_time: start_time)
        new_span.parent = child_of
        new_span.baggage = child_of.baggage.dup
      else
        new_span = Span.new(name, @id, parent_id: @current_span.id, start_time: start_time)
        new_span.parent = @current_span
        new_span.baggage = @current_span.baggage.dup
      end
      new_span.set_tags(kvs) if kvs

      @spans.add(new_span)
      @current_span = new_span
    end
def new_span(name, kvs = nil, start_time = ::Instana::Util.now_in_ms, child_of = nil)
      return unless @current_span

      if child_of && child_of.is_a?(::Instana::Span)
        new_span = Span.new(name, @id, parent_id: child_of.id, start_time: start_time)
        new_span.parent = child_of
        new_span.baggage = child_of.baggage.dup
      else
        new_span = Span.new(name, @id, parent_id: @current_span.id, start_time: start_time)
        new_span.parent = @current_span
        new_span.baggage = @current_span.baggage.dup
      end
      new_span.set_tags(kvs) if kvs

      @spans.add(new_span)
      @current_span = new_span
    end
Initializes a new instance of Trace

 @param name [String] the name of the span to start
 @param kvs [Hash] list of key values to be reported in the span
 @param incoming_context [Hash] specifies the incoming context.  At a
   minimum, it should specify :trace_id and :span_id from the following:
     :trace_id the trace ID (must be an unsigned hex-string)
     :span_id the ID of the parent span (must be an unsigned hex-string)
     :level specifies data collection level (optional)

 Start a new span as a child of @current_span

 @param name [String] the name of the span to start
 @param kvs [Hash] list of key values to be reported in the span