vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb
# Specifies the version of the agent's communication protocol
# with the NewRelic hosted site.
#
# VERSION HISTORY
# 1: Private Beta, Jan 10, 2008.  Serialized Marshalled Objects.  Unsupported after 5/29/2008.
# 2: Private Beta, March 15, 2008.  Compressed Serialzed Marshalled Objects (15-20x smaller)
# 3: June 19, 2008. Added transaction sampler capability with obfuscation
# 4: July 15, 2008. Added error capture
Specifies the version of the agent's communication protocol
with the NewRelic hosted site.

VERSION HISTORY
1: Private Beta, Jan 10, 2008.  Serialized Marshalled Objects.
Specifies the version of the agent ' s communication protocol with the NewRelic hosted site . VERSION HISTORY 1 : Private Beta Jan 10 2008 . Serialized Marshalled Objects .
def graceful_disconnect
      if @connected && !(remote_host == "localhost" && @identifier == '3000')
        begin
          log.debug "Sending graceful shutdown message to #{remote_host}:#{remote_port}"
          @request_timeout = 5
          harvest_and_send_timeslice_data
          if @should_send_samples && @use_transaction_sampler
            harvest_and_send_slowest_sample
          end
          if @should_send_errors
            harvest_and_send_errors
          end
          if @environment != :litespeed
            log.debug "Sending RPM service agent run shutdown message"
            invoke_remote :shutdown, @agent_id, Time.now.to_f
          end
          log.debug "Graceful shutdown complete"
        rescue Timeout::Error, StandardError => e
          log.warn "Error sending shutdown message to #{remote_host}:#{remote_port}:"
          log.warn e
          log.debug e.backtrace.join("\n")
        end
      end
    end
def graceful_disconnect if @connected && ! ( remote_host == "localhost" && @identifier == '3000' ) begin log . debug "Sending graceful shutdown message to #{remote_host}:#{remote_port}" @request_timeout = 5 harvest_and_send_timeslice_data if @should_send_samples && @use_transaction_sampler harvest_and_send_slowest_sample end if @should_send_errors harvest_and_send_errors end if @environment != :litespeed log . debug "Sending RPM service agent run shutdown message" invoke_remote :shutdown , @agent_id , Time . now . to_f end log . debug "Graceful shutdown complete" rescue Timeout :: Error , StandardError => e log . warn "Error sending shutdown message to #{remote_host}:#{remote_port}:" log . warn e log . debug e . backtrace . join ( "\n" ) end end end
Specifies the version of the agent's communication protocol
with the NewRelic hosted site.
Specifies the version of the agent ' s communication protocol with the NewRelic hosted site .