Statter
Send stats to a seven-c-stats backend
Installation
Add this line to your application's Gemfile:
gem 'statter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install statter
Usage
Rails
In an initializer:
# config/initializers/statter.rb
Statter.config do |config|
config.auth_header = "your-auth-header-key"
config.url = "http://url-of-seven-c-stats-backend"
end
Then, whereever you want to collect stats:
# Send a counter stat
Statter.send_counter "my-counter-stat-name", some_count
# Send a value stat
Statter.send_value "my-value-stat-name", some_value
TODO
- Thread pool?
Contributing
- Fork it ( https://bitbucket.org/7compass/statter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request