Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable New Relic from reporting when switching environments locally

We use New Relic to monitor our Rails applications. Sometimes, when we are developing locally, we need to switch to a different environment to test things. We start up our server like so

$ RAILS_ENV=production rails s

Unfortunately, now our app starts sending data to new relic as though we added another machine to our production cluster.

How can we disable the New Relic gem from sending data up to New Relic when we need to test settings locally under a different environment?

like image 666
Brian Wigginton Avatar asked Mar 29 '13 16:03

Brian Wigginton


People also ask

How do I stop New Relic monitoring?

Go to one.newrelic.com, click on Browser > (select a browser app) > Settings > Application settings. To disable only the Pro account level features, select Lite. To turn off browser monitoring completely, select Off. Select Save application settings.

Can New Relic be self hosted?

New Relic Service Broker. This project is a self-hostable application that provides a service broker which proxies New Relic credentials to applications.

What is New Relic reporting?

New Relic is a software analytics service that helps you analyze and improve application interactions. Accounts for Adobe Commerce on cloud infrastructure include the software for the New Relic APM service. For more information, see New Relic services in the developer documentation.


1 Answers

This should work: NEWRELIC_ENABLE=false RAILS_ENV=production rails s

like image 79
Nick Messick Avatar answered Sep 20 '22 20:09

Nick Messick