> For the complete documentation index, see [llms.txt](https://omalab.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omalab.gitbook.io/guide/engineering-wiki/monitoring-and-alerting/monitoring-individual-controller-actions.md).

# 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: counting**Pages::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.
