vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.9.4.245/lib/new_relic/agent/new_relic_service.rb
def invoke_remote(method, payload = [], options = {})
        start_ts = Time.now

        data, size, serialize_finish_ts = nil
        begin
          data = @marshaller.dump(payload, options)
        rescue StandardError, SystemStackError => e
          handle_serialization_error(method, e)
        end
        serialize_finish_ts = Time.now

        data, encoding = compress_request_if_needed(data)
        size = data.size

        uri = remote_method_uri(method, @marshaller.format)
        full_uri = "#{@collector}#{uri}"

        @audit_logger.log_request(full_uri, payload, @marshaller)
        response = send_request(:data      => data,
                                :uri       => uri,
                                :encoding  => encoding,
                                :collector => @collector)
        @marshaller.load(decompress_response(response))
      ensure
        record_supportability_metrics(method, start_ts, serialize_finish_ts, size)
      end
# send a message via post to the actual server. This attempts
# to automatically compress the data via zlib if it is large
# enough to be worth compressing, and handles any errors the
# server may return
send a message via post to the actual server. This attempts
to automatically compress the data via zlib if it is large
enough to be worth compressing, and handles any errors the
server may return
send a message via post to the actual server . This attempts to automatically compress the data via zlib if it is large enough to be worth compressing and handles any errors the server may return
def invoke_remote(method, payload = [], options = {})
        start_ts = Time.now
        data, size, serialize_finish_ts = nil
        begin
          data = @marshaller.dump(payload, options)
        rescue StandardError, SystemStackError => e
          handle_serialization_error(method, e)
        end
        serialize_finish_ts = Time.now
        data, encoding = compress_request_if_needed(data)
        size = data.size
        uri = remote_method_uri(method, @marshaller.format)
        full_uri = "#{@collector}#{uri}"
        @audit_logger.log_request(full_uri, payload, @marshaller)
        response = send_request(:data      => data,
                                :uri       => uri,
                                :encoding  => encoding,
                                :collector => @collector)
        @marshaller.load(decompress_response(response))
      ensure
        record_supportability_metrics(method, start_ts, serialize_finish_ts, size)
      end
def invoke_remote ( method , payload = [ ] , options = { } ) start_ts = Time . now data , size , serialize_finish_ts = nil begin data = @marshaller . dump ( payload , options ) rescue StandardError , SystemStackError => e handle_serialization_error ( method , e ) end serialize_finish_ts = Time . now data , encoding = compress_request_if_needed ( data ) size = data . size uri = remote_method_uri ( method , @marshaller . format ) full_uri = "#{@collector}#{uri}" @audit_logger . log_request ( full_uri , payload , @marshaller ) response = send_request ( :data => data , :uri => uri , :encoding => encoding , :collector => @collector ) @marshaller . load ( decompress_response ( response ) ) ensure record_supportability_metrics ( method , start_ts , serialize_finish_ts , size ) end
send a message via post to the actual server.
send a message via post to the actual server .
method
payload
options