module NewRelic::Agent::Instrumentation::LogStasher::Chain

Public Class Methods

instrument!() click to toggle source
# File lib/new_relic/agent/instrumentation/logstasher/chain.rb, line 7
def self.instrument!
  ::LogStasher.singleton_class.class_eval do
    include NewRelic::Agent::Instrumentation::LogStasher

    alias_method(:build_logstash_event_without_new_relic, :build_logstash_event)

    def build_logstash_event(*args)
      build_logstash_event_with_new_relic(*args) do
        build_logstash_event_without_new_relic(*args)
      end
    end
  end
end

Public Instance Methods

build_logstash_event(*args) click to toggle source
# File lib/new_relic/agent/instrumentation/logstasher/chain.rb, line 13
def build_logstash_event(*args)
  build_logstash_event_with_new_relic(*args) do
    build_logstash_event_without_new_relic(*args)
  end
end