Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

garelic

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

garelic

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Garelic: Use Google Analytics as "New Relic" performance monitoring for your Rails app

This gem uses Google Analytics User Timing API to report application performance statistics directly to Google Analytics, where you can slice & dice your data as you wish.

Here are some features with pictures:

Or look at these slides from a Garelic presentation.

Installation

It's easy as 1-2-3.

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

gem 'garelic'

Step 2. Add <%= Garelic.monitoring 'UA-XXXXXX-X' %> instrumentation in application layout template (before the closing </head> tag) like this:

<head>
    <!-- other rails stuff -->
    <%= Garelic.monitoring 'UA-XXXXXX-X' %>
    <!-- make sure you remove your old GA code! -->
</head>

Step 3. Go to Google Analytics > Content > Site Speed > User Timings

Enjoy!

Known 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 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

FAQs

Package last updated on 18 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc