Name your PHP application

New Relic APM for PHP gives you several ways to change the application name that is reported to, and displayed in, New Relic. This document gives you an overview of those naming options.

For a general overview of APM app naming (not PHP-specific), see Name your application.

Set or change app name

New Relic APM differentiates applications by their name. When you change the name an application reports as, APM creates a new application entity and breaks data continuity between the new and old entity. To change an application's name without breaking data continuity, use the UI alias-change option.

Here are the ways to change your PHP application's name in New Relic:

Use multiple app names

The ability to set multiple app names is only available in PHP agent versions 2.4 or higher.

You can use multiple app names to aggregate data from several applications under the same name in APM (sometimes referred to as "rolling up" your data). For more about how multiple app names work, see Use multiple app names.

For PHP, you can set up to three application names. The primary application name is first, and the second and third names are used for the more general data aggregation categories.

PHP config file example

Here is an example of setting multiple names in the newrelic.ini file:

newrelic.appname="Virtual Host 1;Virtual Hosts in Some Region;All Virtual Hosts"

For more help

Recommendations for learning more: