Module: Oboe::Inst::Rails3ActionController

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



7
8
9
10
11
12
13
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 7

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



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 21

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



15
16
17
18
19
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 15

def process_with_oboe(*args)
  Oboe::API.trace('rails', {}) do
    process_without_oboe *args
  end
end

#render_with_oboe(*args) ⇒ Object



35
36
37
38
39
# File 'lib/oboe/frameworks/rails/inst/action_controller.rb', line 35

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