I would like to be able to see the hostname in the APM UI so I set it in the environment variables using the folllowing:
Environment.SetEnvironmentVariable("ELASTIC_APM_HOSTNAME", "somehostname");

Still, in the APM UI I only get the default machine hostname which in my cloud environment isn't really usefull.

Just to mention that 'SetEnvironmentVariable' works well for setting 'ELASTIC_APM_ENVIRONMENT' and 'ELASTIC_APM_SERVER_URLS'.

Any suggestion what may be wrong?


Kibana version:
Elasticsearch version:
APM Server version:
APM Agent language and version:
dotnet - Elastic.Apm.NetCoreAll 1.9.0

The agent should use the ELASTIC_APM_HOSTNAME environment variable value, but it looks like there is a bug in the agent; the property should be sent to APM server as configured_hostname rather than hostname, as it is currently sent.

I've opened Add configured hostname by russcam · Pull Request #1290 · elastic/apm-agent-dotnet · GitHub to address this for the next release.

Thank you. Any workaround I can do in the meantime?

Unfortunately, there's not a good workaround in the meantime. The new version should be going out soon

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.