Hostnames for dotnet environment in APM

I was at a newrelic training in utrecht and saw a nice feature that in the APM you can filter on host, but we don’t have that dropdown. (screenshot from the demoacount

So i was wondering why that doesn’t snow up on our environment, and i think that is because we have the same hostname for all ec2 instances. Reading the docs i found i can overwrite that in two ways, where the most easy for us would be a environment variable, because we use have a “post deploy” powershell script which makes it easy to set an variable.

So, on the dev server i tested my script and great success, i’ve set an enviroment variable:
[Environment]::SetEnvironmentVariable(“NEW_RELIC_PROCESS_HOST_DISPLAY_NAME”, $instanceId, “Machine”)

resulting in this:

The docs also said to Restart your application, so just to be on the safe side i rebooted the machine. But even after an hour i log in to the NR APM i don’t see the ec2 name i want, but the hostname:

Anyone have any clues what i forgot or did wrong? And is my assumption that having all the same host names makes it so that we don’t have a dropdown to filter on host?

Sidenote: Our dev env only has one server, so i would expect i couldn’t filter there, but that the name i set as environment variable would show up in APM instead of the hostname.

Always use unique hostnames across a single environment.

Always check the time frame you are viewing as that can catch you out if it is fixed in place.

Ensure enough time has passed for metrics to be collected.

Troubleshoot to ensure metrics are being collected.

Metrics collection works fine, just would like to have a different hostname. Hostenames are provided by AWS autoscaling, and are not unique, that’s why i choose the overwrite option metioned in the docs.

Hi there @jeroen.pot,

It sounds like you’re looking to have a unique “Display Name” appear to separate data between different hosts. You’re correct that all hostnames that are identical will appear in the UI consolidated as one host.

Here’s what that dropdown might look like with displayName added:


Note: This displayName will only appear in the Server Dropdown list and not in the host breakdown section in your screenshot.

Unfortunately, the displayName configuration option will likely not be useful in this scenario. I’ve been researching this and in my testing, that display name in the server dropdown changes when the default hostnames are not unique (and they are not in your case) because the displayNames are tied to the original hostname. The displayNames tied to your one default hostname in this case will be replaced each time one of your instances connects.

I’ll be submitting a feature request on your behalf for this capability as I can definitely see the advantage of the ability to set these hostnames especially with your use case, which I will be describing in detail along with the request. At the moment, I don’t have a timeline for this feature, but submitting this request will certainly help with its prioritization. You can also head over to our Feature Ideas and add this idea there.

I hope that helps explain this, but if you have further questions let me know.

1 Like


Thank you for the reply. To bad it’s not supported yet, but nice that you’re taking it as a feature request.
Can i track this request somewhere?

@jeroen.pot - We don’t have a publicly available Feature Idea tracking tool.

That said, if you can create a topic in the Feature Idea category, we can try to update that thread if this feature is implemented.



Thanks @jeroen.pot :slight_smile: