Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Node.js APM agent configuration is not honoring the display_name


agent version: 4.12.0

As shown in the “Custom Hostname Variables” section of this docs page, i have set the property to a desired host instance name to be shown on the APM UI. I added the below snippet to the newrelic.js file we copy to the root directory of the project.

    process_host: {
    display_name: 'someName'

The app is running in a docker container. Instead of showing the set name, it is listed as the container id. As per the docs, if it cannot find any set property, it will set the os.hostname(). But even if I provided the name, it still set the same. Please let me know if this is a known issue or if I’m doing something wrong.


Hi there @teja.adusumilli - thanks for writing to the community!

The snippet you provided looks correct, so the next steps will involve gathering more info to troubleshoot.
I’m going to open a support ticket on your behalf for this issue, so we can protect sensitive information.

We will continue troubleshooting from that platform going forward, but we like to encourage folks to circle back to the community to share the solution we find at the end of this process so others can learn from your post too! :slight_smile:

Keep your eyes open for an email coming your way from us.




After the support from New Relic team, we found the following solutions to mitigate this issue.

Solution 1: Follow the steps from initial post to setup the display_name to desired value. If the app runs on multiple servers, it is shown as a dropdown on the top of the Overview Page. Your display name will be listed in the dropdown.

Solution 2: In my case, since the app is running in a docker container, my host name is set to the container id. If the display_name is to be shown on the Overview Page at the bottom instead of container id under the hosts, while giving the docker run command, use the --hostname flag and pass in the desired value (whatever value you were trying to set to display_name). That should do it!!


Hey @teja.adusumilli - Thanks so much for sharing those solutions here. :smiley: