Module: Oboe::Inst::ActionController3

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

Overview

ActionController3

This modules contains the instrumentation code specific to Rails v3

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



82
83
84
85
86
87
88
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 82

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

Instance Method Details

#process_action_with_oboe(*args) ⇒ Object



101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 101

def process_action_with_oboe(*args)
  report_kvs = {
    :Controller   => self.class.name,
    :Action       => self.action_name,
  }
  Oboe::API.log(nil, 'info', report_kvs)

  process_action_without_oboe *args
rescue Exception => exception
  report_kvs[:Status] = 500
  Oboe::API.log(nil, 'info', report_kvs)
  raise
end

#process_with_oboe(*args) ⇒ Object



90
91
92
93
94
95
96
97
98
99
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 90

def process_with_oboe(*args)
  Oboe::API.log_entry('rails')
  process_without_oboe *args

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