Module: Oboe::Inst::Rails4ActionController

Included in:
ActionController::Base
Defined in:
lib/oboe/frameworks/rails/inst/action_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



43
44
45
46
47
48
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 43

def self.included(base)
  base.class_eval do
    alias_method_chain :process_action, :oboe
    alias_method_chain :render, :oboe
  end
end

Instance Method Details

#process_action_with_oboe(method_name, *args) ⇒ Object



50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 50

def process_action_with_oboe(method_name, *args)
  return process_action_without_oboe(method_name, *args) if Oboe::Config[:action_blacklist].present? &&
    Oboe::Config[:action_blacklist][[self.controller_name, self.action_name].join('#')]

  report_kvs = {
    :Controller   => self.class.name,
    :Action       => self.action_name,
  }
  Oboe::API.trace('rails', report_kvs) do
    process_action_without_oboe(method_name, *args)
  end
end

#render_with_oboe(*args) ⇒ Object



63
64
65
66
67
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 63

def render_with_oboe(*args)
  Oboe::API.trace('actionview', {}) do
    render_without_oboe(*args)
  end
end