New Relic's Java agent gives you several ways to change the application name that is reported and displayed in APM. This document gives you an overview of those naming options.
For a general overview of app naming (not Java-specific), see Name your application.
Set or change app name
APM differentiates applications by the name they report as. Data continuity breaks when you change the application name. To change an application's name without breaking data continuity, use the UI alias-change option.
Here are the ways to change your Java application's name:
Naming method | Description |
---|---|
Recommended: Configure | Configure your
|
Configure | Set a system property with JVM arguments to set unique app names for multiple applications that report to the same Java agent:
|
Set app name using environment variables | Set an environment variable to easily set app names during the deployment of containers, or to ensure an app name stays the same through multiple iterations of a bash
|
Automatic application naming | Enable automatic application naming in your
|
Change alias via UI | Change an application's alias to change only the displayed name in the UI. This does not change the name the application reports as. This does not break data continuity, unlike all other options. |
Sugerencia
Note that some methods take precedence over others.
Use multiple app names
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.
In Java, you can set up to three app names. The primary app name is first, while the second and third names are used for the more general data aggregation categories.