lib/praxis/plugins/rails_plugin.rb
# Wrap the original action dispatch with a method that instruments rails-expected bits...
Wrap the original action dispatch with a method that instruments rails-expected bits
Wrap the original action dispatch with a method that instruments rails - expected bits
def instrumented_dispatch( praxis_payload )
              rails_payload = {
                :controller => controller.class.name,
                :action     => action.name,
                :params     => ( (request.params) ? request.params.dump : {} ),
                :method     => request.verb,
                :path       => (request.fullpath rescue "unknown")
              }
              Praxis::Notifications.instrument("start_processing.action_controller", rails_payload.dup)
              Praxis::Notifications.instrument 'process_action.action_controller' do |data|
                begin
                  res = orig_instrumented_dispatch(praxis_payload)
                  data[:status] = res[0]
                  res
                ensure
                end
              end
            end
def instrumented_dispatch ( praxis_payload ) rails_payload = { :controller => controller . class . name , :action => action . name , :params => ( ( request . params ) ? request . params . dump : { } ) , :method => request . verb , :path => ( request . fullpath rescue "unknown" ) } Praxis :: Notifications . instrument ( "start_processing.action_controller" , rails_payload . dup ) Praxis :: Notifications . instrument 'process_action.action_controller' do | data | begin res = orig_instrumented_dispatch ( praxis_payload ) data [ :status ] = res [ 0 ] res ensure end end end
Wrap the original action dispatch with a method that instruments rails-expected bits...
Wrap the original action dispatch with a method that instruments rails - expected bits ...
# TODO: also add the db_runtime and view_runtime values... # Append DB runtime to payload #data[:db_runtime] = 999 # Append rendering time to payload #data[:view_runtime] = 123
praxis_payload
<not_specific>