class ElasticAPM::Span

@api private

def done

def done
  @duration = Util.micros - @transaction.timestamp - relative_start
  self
end

def done?

def done?
  !!duration
end

def initialize(

rubocop:disable Metrics/ParameterLists
def initialize(
  transaction,
  id,
  name,
  type = DEFAULT_KIND,
  parent: nil,
  context: nil
)
  @transaction = transaction
  @id = id
  @name = name
  @type = type
  @parent = parent
  @context = context
  @stacktrace = nil
end

def running?

def running?
  relative_start && !done?
end

def start

def start
  @relative_start = Util.micros - @transaction.timestamp
  self
end