我在 heroku 上运行一个带有葡萄(无导轨)的 ruby 应用程序,并且正在使用新的 relic 插件。该应用程序与独角兽分叉。如此处所述,我将此选项集成到我的配置中。这是我的设置:
unicorn.rb:
worker_processes 3
preload_app true
timeout 30
config.ru:
if ENV['RACK_ENV'] == 'production'
require 'newrelic_rpm'
end
heroku 上的环境设置为生产环境,因此应正确包含该文件。此外,heroku 日志文件表明新的 relic 代理已成功启动:
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
对我来说,一切似乎都很好。但在新遗物上,我只收到部署通知。有人有想法吗?
非常感谢。