Skip to content

Application Performance Monitoring (APM)#

Application Performance Monitoring (APM) shows you how your application behaves in production, including request traces, slow transactions, database query performance and errors.

Built-in APM tooling#

The Lagoon base images for PHP come with two APM and profiling agents already installed:

Because the agents are already installed in the images, you don't need to add anything. You provide the relevant licence or credentials and enable the agent through environment variables. See the PHP base image environment variables in the Lagoon documentation for the full list, including NEWRELIC_ENABLED, NEWRELIC_LICENSE, BLACKFIRE_ENABLED, BLACKFIRE_SERVER_ID and BLACKFIRE_SERVER_TOKEN.

Tip

Set these values as environment variables on the relevant environment. Keep secrets such as licence keys and tokens as runtime scoped variables so they are not committed to your repository.

Using New Relic with Node.js

The pre-installed New Relic agent applies to the PHP base images. New Relic also supports Node.js, but this requires application-specific integration that we cannot supply in the base images. You add the newrelic package to your project and load it when your application starts, then supply the licence key and configuration through environment variables. See the New Relic Node.js documentation for details.

New Relic licensing#

To use New Relic you need a licence key. There are two ways to get one:

  • Bring your own (BYO): if you already have a New Relic account, use your own licence key. You keep full ownership of your account, billing and data.
  • amazee.io passthrough: amazee.io can supply a licence key under a passthrough arrangement. Pricing depends on the cost of New Relic, so contact your Customer Engagement Manager (CEM) for details.

Note

New Relic offers a free tier. For small sites that only need basic APM, this may be enough to get started at no cost.

Bringing your own APM#

Some customers prefer to run their own APM solution, such as Dynatrace. You are welcome to install your own agent onto your images.

Warning

amazee.io cannot bundle third-party APM agents such as Dynatrace into the base images due to licensing restrictions. You are responsible for installing and configuring these agents yourself, usually by extending your image's Dockerfile.

If the agent you want to use runs at the cluster level rather than within your application container, we can only support this on a dedicated cluster. Reach out to your Technical Account Manager (TAM) to discuss the available options.