Monitoring individual controller actions

Where is data collected and where is it sent to?

Data is collected in the application_controller. We count action executions and errors on the action.

before_filter 
:stat_action
def
stat_action
# counting individual action's executions
  stats_event params[:action]
end

stat_* methods come from Oma::Stats and are present in every controller and queue/processor pair by default.

Whenever we call a stat method a metric name is generated automatically. The stat name is generated as a combination of oma/config/initializers/fozzie.rb and oma-models/lib/oma/stats.rb

Example: countingPages::OverviewController#index

stats.counters.oma.production.web.pages.overview_controller.index.count
   static-prefix  . Oma.env  .web.  controller class_name  .action.stat_type

You can see all of the collected metrics here:http://graphite.omamatic.com/Navigate to: stats.counters.oma.production.web from that point on the structure matches the controller folder from oma/app.

Last updated