Configure New Relic in EE4

In EasyEngine, running different parts of New Relic has been split into multiple containers.

  1. New Relic Daemon – The daemon runs in a separate container with only one process. Moreover, the New Relic daemon is running in foreground mode so that the Docker can take care of the service in case of a failure.
  2. New Relic APM agent – This agent runs inside the PHP container as the agent is actually a PHP extension and no separate process is required.

As a user, you just have to get the New Relic Licence Key from it’s dashboard and add it in the .env file for the site.

ee service enable newrelic-daemon

cat /opt/easyengine/sites/example.com/.env
NEWRELIC_LICENSE_KEY=MySuperSecretNewrelicKey

# Need to run disable and enable to activate NewRelic
cd /opt/easyengine/sites/example.com
ee site enable --force