SnowAgent
Gem for sending metrics to SnowmanIO.
Installation
- Register new application in your SnowmanIO instance.
- Add
gem 'snowagent'
to application's Gemfile. - Add two environments variables as described on 'Install' section of application
Example of installation instructions page:
Usage
The main goal of SnowmanIO is to collect low frequient business metrics and trends. So the agent supports only synchronous mode of sending metrics via HTTP/HTTPS.
It's strongly recomended don't send metric directly from request. Instead use cron tasks, delalyed jobs and other background processes to deliver metrics!
Code examples:
# In controller
SnowAgent.delay.increment("User Login")
# In scheduled task
SnowAgent.time("Task Time") do
# time consumed calculations
end
# Some custom metric
SnowAgent.metric("Sessions Amount", Session.alive.count, "amount")
Contributing
- Implement a feature (remember about tests and CHANGELOG.md!)
- (optional) Suggest a blog mini post about new feature
- :snowman: will be happier