Project

nosey

0.0
No commit activity in last 3 years
No release in over 3 years
Nosey is a way to instrument your Evented Ruby applications to track counts, aggregates, etc. It was built a Poll Everywhere because we need a way to peer into our Evented apps and grab some basic statistics so that we could graph on Munin. Since we needed this instrumentation available in several EM projects, we gathered the basics up into this gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
          |     |
          |     |
         /       \
        ( __   __ )   Nosey - Realtime Ruby app instrumentation.
         '--'-;  ;
              |  |
        _     |  |
   __ /` ``""-;_ |
   \ '.;------. `\
    | |    __..  |
    | \.-''   _  |
    | |  ,-'-,   |
    |  \__.-'    |
     \    '.    /
      \     \  /
       '.      |
    jgs  )     |

Nosey is a way to instrument your Evented Ruby applications to track counts, aggregates, etc. It was built a Poll Everywhere because we need a way to peer into our Evented apps and grab some basic statistics so that we could graph on Munin. Since we needed this instrumentation available in several EM projects, we gathered the basics up into this gem.

Getting Started

Install the gem.

gem install nosey

Instrument your Ruby app with nosey.

require 'nosey'

class PandaBear
  include Nosey::Instrumentation

  def initialize
    nosey.touch 'started_at'
  end

  def growl(volume=1)
    nosey.touch 'last-growled-at'
    nosey.increment 'growl-count'
    nosey.avg 'growl-volume-avg', volume
    nosey.min 'growl-volume-min', volume
    nosey.max 'growl-volume-max', volume
    "G#{'r' * volume}!"
  end
end

princess = PandaBear.new
10.times {|n| princess.growl rand * 5 }
princess.nosey.report  # Soon to be a fantastico report, prolly in YML

When you fire Ruby this up, Nosey will open up a socket and report the stats.

$ cat /tmp/panda_bear.rb.socket

panda_bear.rb:
  started_at: 2011-09-13 23:21:52.530452000 -07:00
  last_growled_at: 2011-09-13 23:21:52.530452000 -07:00
  growls: 1

Thats the plan anyway. For now this is only going to work in EM, so its super handy if you're building EM servers and want to dump out the stats.