Reputation: 1215
I am trying to use New Relic to investigate a performance issue with my Rails 4 app. On my development machine, I run the app using Thin, and can successfully use the New Relic console by accessing http://localhost:3000/newrelic
.
However, in production my app runs at a different base URL (http://server/app
) and is being served with Nginx and Passenger. When I try to access the New Relic console by visiting http://server/app/newrelic
, I do get a response - but the console page is blank, with no data. Looking at the source of the page, I can see that it references resources at http://server/newrelic
, WITHOUT the necessary base URL suffix of /app
.
Can I configure New Relic to use the correct base URL?
Upvotes: 0
Views: 465
Reputation: 669
The Ruby agent's "developer mode" feature should never be used in a production environment. The memory and CPU overhead of developer mode is significantly higher than the production monitoring performed by the agent, and it contains no mechanism for restricting access to the information it gathers, because it is only intended to be run locally.
In production, you should use the regular monitor_mode
instead (configurable in your newrelic.yml), and view the graphs at your New Relic dashboard (rpm.newrelic.com/accounts/xxx/applications/xxx).
Upvotes: 1
Reputation: 1215
Ok, I did work around the problem by adding this to nginx.conf
on the production server:
location /newrelic/ {
proxy_pass http://127.0.0.1/app/newrelic;
}
But this is only good for one application, so the original question still stands.
Upvotes: 0