Module: Oboe::Inst::ActionController4

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

Overview

ActionController4

This modules contains the instrumentation code specific to Rails v4

Class Method Summary collapse

Instance Method Summary collapse

Methods included from RailsBase

#has_handler?, #log_rails_error?, #render_with_oboe

Class Method Details

.included(base) ⇒ Object



125
126
127
128
129
130
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 125

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



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 132

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.log_entry('rails')
  process_action_without_oboe(method_name, *args)

rescue Exception => e
  Oboe::API.log_exception(nil, e) if log_rails_error?(e)
  raise
ensure
  Oboe::API.log_exit('rails')
end