vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.4.245/lib/new_relic/agent/new_relic_service.rb
# One session with the service's endpoint.  In this case the session
# represents 1 tcp connection which may transmit multiple HTTP requests
# via keep-alive.
One session with the service's endpoint.  In this case the session
represents 1 tcp connection which may transmit multiple HTTP requests
via keep-alive.
One session with the service ' s endpoint . In this case the session represents 1 tcp connection which may transmit multiple HTTP requests via keep - alive .
def session(&block)
        raise ArgumentError, "#{self.class}#shared_connection must be passed a block" unless block_given?
        begin
          t0 = Time.now
          if NewRelic::Agent.config[:aggressive_keepalive]
            session_with_keepalive(&block)
          else
            session_without_keepalive(&block)
          end
        rescue Timeout::Error
          elapsed = Time.now - t0
          ::NewRelic::Agent.logger.warn "Timed out opening connection to collector after #{elapsed} seconds. If this problem persists, please see http://status.newrelic.com"
          raise
        end
      end
def session ( & block ) raise ArgumentError , "#{self.class}#shared_connection must be passed a block" unless block_given? begin t0 = Time . now if NewRelic :: Agent . config [ :aggressive_keepalive ] session_with_keepalive ( & block ) else session_without_keepalive ( & block ) end rescue Timeout :: Error elapsed = Time . now - t0 :: NewRelic :: Agent . logger . warn "Timed out opening connection to collector after #{elapsed} seconds. If this problem persists, please see http://status.newrelic.com" raise end end
One session with the service's endpoint.
One session with the service ' s endpoint .
block