I'm running a ruby app with grape (no rails) on heroku and am using the new relic addon. The app is forked with unicorn. As described here, I integrated this option to my configs. Here's my setup:
unicorn.rb:
worker_processes 3
preload_app true
timeout 30
config.ru:
if ENV['RACK_ENV'] == 'production'
require 'newrelic_rpm'
end
The environment on heroku is set to production, so the file should be included properly. Furthermore, the heroku log files indicate that the new relic agent starts up successfully:
2013-04-08T10:47:47+00:00 heroku[deployhooks]: Notified New Relic about the deploy
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Reading configuration from config/newrelic.yml
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Environment: production
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Dispatcher: unicorn
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Application: mobile-v1-ruby
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Connecting workers after forking.
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Installing Net instrumentation
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Installing Unicorn instrumentation
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Detected Unicorn, please see additional documentation: https://newrelic.com/docs/troubleshooting/im-using-unicorn-and-i-dont-see-any-data
2013-04-08T10:47:49+00:00 app[web.1]: ** [NewRelic][04/08/13 10:47:49 +0000 eea5ecfd-86be-4b88-8b2a-6b7564aa9943 (2)] INFO : Finished instrumentation
2013-04-08T10:47:49+00:00 app[web.1]: Hey there - I started in environment: production
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.798057 #2] INFO -- : listening on addr=0.0.0.0:58224 fd=9
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.798299 #2] INFO -- : worker=0 spawning...
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.809140 #2] INFO -- : worker=1 spawning...
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.812632 #5] INFO -- : worker=0 spawned pid=5
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.816144 #2] INFO -- : worker=2 spawning...
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.819594 #5] INFO -- : worker=0 ready
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.821252 #9] INFO -- : worker=1 spawned pid=9
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.823869 #2] INFO -- : master process ready
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.826441 #9] INFO -- : worker=1 ready
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.831072 #13] INFO -- : worker=2 spawned pid=13
2013-04-08T10:47:49+00:00 app[web.1]: I, [2013-04-08T10:47:49.836053 #13] INFO -- : worker=2 ready
2013-04-08T10:47:50+00:00 heroku[web.1]: State changed from starting to up
To me everything seems to work good. But on new relic, I only receive the deployment notifications. Does anybody have an idea?
Thank you very much.