Skip to content

Instantly share code, notes, and snippets.

@alq666
Created October 23, 2012 00:26
Show Gist options
  • Save alq666/3935851 to your computer and use it in GitHub Desktop.
Save alq666/3935851 to your computer and use it in GitHub Desktop.
Statsd example
irb(main):001:0> require 'statsd'
=> true
irb(main):002:0> s = Statsd.new('localhost', 8125)
=> #<Statsd:0x007fe299833f28 @host="localhost", @port=8125, @prefix=nil, @socket=#<UDPSocket:fd 5>>
irb(main):003:0> s
=> #<Statsd:0x007fe299833f28 @host="localhost", @port=8125, @prefix=nil, @socket=#<UDPSocket:fd 5>>
irb(main):004:0> s.time('test.alq.statsd', :tags => ['abc', 'def']) { puts "abc" }
abc
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment