This gem adds allow your Rails app to report performance metrics for database queries and response times to InfluxDB.
Add this line to your application's Gemfile:
If you're using the 8.x line of InfluxDB, you'll need this line as well:
gem 'influxdb', '~> 0.1.9'
And then execute:
InfluxDB::Rails is a really great project. It allows tracking controller metrics right out of the box. It also includes exception tracking, which is really great if you don't have it setup yet. I use a different service to do exception tracking, so I just want to use InfluxDB for performance metrics.
Also, I wanted to be able to track SQL query performance. That's included.
::. do |config| config.host = 'example.com' # or config.hosts = ['example1.com', 'example2.com'] # The following values are defaults: # config.app_name = 'rails' # config.username = 'root' # config.password = 'root' # config.database = 'rails' # config.port = 8086 # You can customize which stats get recorded: # config.events = :action_controller, :active_record end
- Fork it ( https://github.com/rzane/influxdb-metrics/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