Disconnect new relic from reports when switching environment locally

We use New Relic to monitor our Rails applications. Sometimes, when we develop locally, we need to switch to a different environment in order to test things. We start our server like this

$ RAILS_ENV=production rails s 

Unfortunately, now our application starts sending data to a new relic, as if we added another machine to our production cluster.

How can we disconnect the New Relic stone from sending data to New Relic when we need to test the settings locally in another environment?

+7
source share
1 answer

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

+8
source

All Articles