Module: NewRelic::Agent::Instrumentation::Tilt::Chain

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

Class Method Summary collapse

Class Method Details

.instrument!Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/new_relic/agent/instrumentation/tilt/chain.rb', line 8

def self.instrument!
  ::Tilt::Template.module_eval do
    include NewRelic::Agent::Instrumentation::Tilt

    def render_with_new_relic(*args, &block)
      render_with_tracing(*args) {
        render_without_newrelic(*args, &block)
      }
    end

    alias render_without_newrelic render
    alias render render_with_new_relic
  end
end