Performance monitoring for your Rails apps.
This gem collects performance data from your Rails app. It does this by collecting the data and then sending it to the monitoring app which shows the data in a human readable form. This gem and the app work in conjunction. First, set up the app and then install this gem to your apps that you want to monitor.
This gem works with Rails 4.x.
Add this line to your application’s Gemfile:
gem 'rails-perfmon', git: 'https://github.com/yan-hoose/rails-perfmon.git'
And then execute:
$ bundle
Then create a new initializer:
# config/initializers/perfmon.rb
RailsPerfmon.configure do |config|
config.service_url = 'https://the.host.where.you.set.up.your.monitoring.app'
config.api_key = 'secret123'
config.params_inclusion_threshold = 5 # optional
end if Rails.env.production?
You get the API key from the “Website settings” menu in your monitoring app.
If the monitoring app is running on HTTPS and with a self-signed cert, add this to the config:
config.ssl_verify_mode = OpenSSL::SSL::VERIFY_NONE
params_inclusion_threshold
sets the threshold when request params are added to the payload. A value of 5 means that parameters of all requests that take 5 seconds or more will be included in the request data. A value of nil
(the default) means that params are never added to request data.
And that is it. After you deploy the changes, the performance data of your app should start appearing in the monitoring app. The data is sent after every 5 minutes, so it’ll take at least 5 minutes for the data to start appearing.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)