In terminal:
heroku addons:add newrelic:standard
Add this gem to your Gemfile:
gem 'newrelic_rpm'
Create config/newrelic.yml with this script:
--- <%= ENV["RACK_ENV"] %>: error_collector: capture_source: true enabled: true ignore_errors: ActionController::RoutingError apdex_t: 0.5 ssl: false monitor_mode: true license_key: <%= ENV["NEW_RELIC_LICENSE_KEY"] %> developer_mode: false app_name: <%= ENV["NEW_RELIC_APP_NAME"] %> transaction_tracer: record_sql: obfuscated enabled: true stack_trace_threshold: 0.5 transaction_threshold: apdex_f capture_params: false log_level: info
Add to your root .rb file:
configure :production do require 'newrelic_rpm' end
Thanks a lot! One remark: at least Cedar apps seem to come with
RACK_ENV=production
out of the box.