Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Use Google Analytics for Rails App Performance Monitoring.
Tag: v0.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE
README.md
Rakefile
garelic.gemspec

README.md

Garelic: Google Analytics Reports as "New Relic"-like performance monitoring for your Rails app

This is a proof of concept and will probably break things. Use it at your own risk.

Installation

  1. Add this line to your application's Gemfile:

    gem 'garelic'

  2. Add Garelic::Timing instrumentation to your GA code in application layout template like this:

  3. Go to Google Analytics > Content > Site speed > User Timings

  4. Enjoy!

Know advantages

  • it's free
  • shows slow performing pages (not only actions)
  • show response times histogram for any action (response time averages tend to lie, since distribution of response times is multimodal)
  • segment/slice/dice response data across any dimensions available in your GA account

Known drawbacks

  • you can only track actions that return a response body (redirects, ajax-requests & async jobs are not supported)
  • all timings are visible in page source code (if you are concerned about this look elsewere)
  • caching GA code (e.g. page caching) & not modified response will probably break/skew reported statistics
  • adding user timing table widgets to GA dashboards does not preserve sorting order (wtf?)
  • it's kind of a hack

TODO

  • add more fine-grained ActiveRecord instrumentation
  • add support for adding custom user tracers (e.g. for external services)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.