Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the instrumentation API in Ruby/Rails?

Based on: http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html

It says:

Notifications provides an instrumentation API for Ruby. To instrument an action in Ruby you just need to do:

What exactly is an instrumentation API and what does it do?

Thanks!

like image 286
Chris Goyal Avatar asked Jun 15 '11 20:06

Chris Goyal


People also ask

What is a Rails API?

Rails::API is a subset of a normal Rails application, created for applications that don't require all functionality that a complete Rails application provides. It is a bit more lightweight, and consequently a bit faster than a normal Rails application.

What is REST API in Ruby on Rails?

REST stands for REpresentational State Transfer and describes resources (in our case URLs) on which we can perform actions. CRUD , which stands for Create, Read, Update, Delete, are the actions that we perform. Although, in Rails, REST and CRUD are bestest buddies, the two can work fine on their own.

What is Active Support in Rails?

Active Support is the Ruby on Rails component responsible for providing Ruby language extensions, utilities, and other transversal stuff. It offers a richer bottom-line at the language level, targeted both at the development of Rails applications, and at the development of Ruby on Rails itself.


1 Answers

There is a very nice railscast on this topic:

http://railscasts.com/episodes/249-notifications-in-rails-3

like image 143
mkro Avatar answered Oct 13 '22 20:10

mkro