• Stars
    star
    171
  • Rank 214,522 (Top 5 %)
  • Language
    Ruby
  • Created over 14 years ago
  • Updated almost 13 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Observe and learn how your users are interacting with your web applications.

RackAmole

Observe your web applications in the wild!

DESCRIPTION

The MOle is a rack application that monitors user interactions with your web site. We are not 
talking about counting page hits here. The MOle tracks all the information available to capture
the essence of a user interaction with your application. Using the MOle, you are able to see
which feature is a hit or a bust. As an added bonus, the MOle also track performance and exceptions 
that might have escaped your test suites or alpha env. To boot your managers will love you for it! 

Whether you are releasing a new application or improving on an old one, it is always a good thing 
to know if anyone is using your application and if they are, how they are using it. 
What features are your users most fond of and which features find their way into the abyss? 
You will be able to rapidly assess whether or not your application is a hit and if
your coolest features are thought as such by your users. You will be able to elegantly record user
interactions and leverage these findings for the next iteration of your application.

PROJECT INFORMATION

Developer:  Fernand Galiana
Blog:       http://www.liquidrail.com
Site:       http://rackamole.com
Twitter:    http://twitter.com/rackamole
Forum:      http://groups.google.com/group/rackamole
Git:        git://github.com/derailed/rackamole.git

FEATURES

Monitors any rack based framework such as Rails and Sinatra
Captures the essence of the request as well as user information
Tracks performance issues based on your latency threshold
Tracks exceptions that might occurred during a request

REQUIREMENTS

Logging
Hitimes
mongo + mongo_ext
Chronic
Erubis
Twitter4r  
Mail
Growl

INSTALL

sudo gem install rackamole

USAGE

Rails applications

Edit your environments ruby files and add the following lines:

config.middleware.use Rack::Mole, { :app_name => "My Cool App", :user_key => :user_name }

This instructs the mole to start logging information to the console and look for the user name 
in the session using the :user_name key. In order to associate an action with a logged in user you
must set a session env variable, in this case we use user_name. There are other options available, 
please take a look at the docs for more information.

Sinatra Applications

Add the following lines in the config section and smoke it...

require 'rackamole'
configure do
  use Rack::Mole, { :app_name => "My Sinatra App", :user_key => :user_name }
end

This assumes that you have session enabled to identify a user if not the mole will log the user
as 'Unknown'

Notables

Rackamole also comes with an option to specify a yaml config file to initialize the various settings.
This comes in very handy when you need to specify different options depending on the environment you
are operating in. Please see the spec/test_configs/rackamole_test.yml for an example.

Storing moled information

Rackamole currently comes with a single storage strategy. More will come in the near future, but
currently we are using MongoDb as our default storage. The idea here is to create a database for
a given moled app per environment. For instance, for application 'Fred', you will need to use a 
separate store for Fred running in alpha mode and Fred running in production mode.

In order to use a store, you will need to pass in the :store option. There currently 2 store 
types a logger and a mongo adapter. By default the store is set to log moled information to the console. 
To change to a mongo store simply add the following options:

use Rack::Mole, { :app_name => "Fred", :store => Rackamole::Store::MongoDb.new( :db_name => 'mole_fred_alpha_mdb' ) }

This expect a local mongo instance to be running on the default port. You can change the 
location by adding :host and :port options.

NOTE: If you intend to use Wackamole please use the following mongo database naming convention

mole_{app_name}_{environment}_mdb

NOTE: Rackamole also provides for preventing certain sensitive params from being logged. You can specify
param_excludes or session_excludes as array of symbols to exclude specific request or session params.

Alerting

Rackamole provides 3 different kind of alerting mechanisms: twitter, email, growl
Please see docs for the various configuration settings.

For example to setup email alerts, add the following lines in your rackamole config file.

# Email
email: &email
  :from: '[email protected]'
  :to: 
    - '[email protected]'
    - '[email protected]'
  :alert_on:
    - <%=Rackamole.perf%>
    - <%=Rackamole.fault%>  

Then

# => Dev
development:
  :app_name:  Killer App
  :user_key:  :user_name  
  :email:     *email

This will setup email alerts when rackamole detect performance or uncaught exceptions

LICENSE:

(The MIT License)

Copyright © 2009

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
Go
24,556
star
2

popeye

👀 A Kubernetes cluster resource sanitizer
Go
4,412
star
3

mongo3

Rule your mongoDB clusters!
JavaScript
444
star
4

rhouse

Home Automation using Ruby
Ruby
61
star
5

ex_ray

An Elixir OpenTracing library based on Otter
Elixir
56
star
6

ziya

A powerful charting framework to easily add charts to your rails/merb applications
Ruby
55
star
7

wackamole

Observe your web apps in the wild... A companion app for rackamole
JavaScript
40
star
8

motion-awesome

As if more awesomeness was needed
Ruby
40
star
9

motion-blow

High-fiber formula for your RubyMotion screen dumps!
Ruby
18
star
10

bigbertha

Ruby implementation for Firebase
Ruby
15
star
11

mole

Monitors users interactions with your rails application
Ruby
12
star
12

ziya-galeria

Sample ZiYa charts rails application that demonstrate the gem features
Ruby
9
star
13

ex_ray_tracers

Sample Phoenix apps to demonstrate OpenTracing with Elixir
Elixir
9
star
14

mongo_rack

Rackable mongoDB based session management
Ruby
8
star
15

motion-map

Port of the most excellent Map gem to RubyMotion
Ruby
7
star
16

homebrew-k9s

K9s OSX Homebrew repo
Ruby
6
star
17

my_rhouse

Code samples for building a ruby home automation system with the RHouse gem
Ruby
5
star
18

mongo-ssl

Docker build for mongo+ssl on ubuntu
4
star
19

gameofthrones

An Elixir/Phoenix release deployment sample
JavaScript
4
star
20

rubios

Set of sample RubyMotion apps for folks interested on improving their IOS fu.
Ruby
4
star
21

snitch

Mole companion application
Ruby
4
star
22

sonic-kube

A sample Go application for sending out SonicPi beats based on Kubernetes cluster events
Go
3
star
23

ex_cut

Elixir Cross Cutting function annotations
Elixir
3
star
24

rhouse-app

2
star
25

homebrew-popeye

Popeye Homebrew Formula
Ruby
2
star
26

hangman

Hangman sample written in Go
Go
2
star
27

lineman-derailed-template

Awesomely Opinionated Lineman Template -- Angular | Bower | Haml | Coffee | Sass | Ruby
JavaScript
2
star
28

ex_bot

Elixir for IOT
Elixir
1
star
29

elasticsearch

ElasticSearch search slides + labs
Ruby
1
star
30

wewoo

Ruby wrapper for graph databases management
Ruby
1
star
31

ey-cloud-recipes

A starter repo for custom chef recipes on EY's cloud platform
Ruby
1
star
32

helm-charts

Helm charts sample repo
1
star
33

movie

Iconoflix movies loader
Go
1
star