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 APM app naming (not Java-specific), see Name your application.
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:
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
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.
Note that some methods take precedence over others.
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.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.