Module: LogStasher::Chain

Defined in:
lib/new_relic/agent/instrumentation/logstasher/chain.rb

Class Method Summary collapse

Class Method Details

.instrument!Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# 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