# File lib/new_relic/agent/transaction_sample_builder.rb, line 102
      def finish_trace(time=Time.now.to_f)
        # Should never get called twice, but in a rare case that we can't
        # reproduce in house it does.  log forensics and return gracefully
        if @sample.finished
          ::NewRelic::Agent.logger.error "Unexpected double-finish_trace of Transaction Trace Object: \n#{@sample.to_s}"
          return
        end
        @sample.root_node.end_trace(time.to_f - @sample_start)

        @sample.threshold = transaction_trace_threshold
        @sample.finished = true
        @current_node = nil
      end