How do we specify the ServerUrls, ServiceName, etc. when using the Public API of the APM .NET Agent? I need to change from the default http://localhost:8200 to a different URL but I am unable to find where it needs to be set.
The application I am trying to instrument manually is a web application on .NET Framework 4.5. I have a few console applications on .NET Framework 4+ that I am planning to do as well if I can figure out how to set the configurations properly.
thanks @nugusbayevkk for the link, that's exactly the part of the documentation that contains the answer.
So the default way to configure the agent is to use environment variables, that works with basically every setup (then we also have IConfiguration for ASP.NET Core, but that's not the topic here...). For changing the URL of the server the ELASTIC_APM_SERVER_URLS environment variable should be used.
Given the server URL can be configured for ASP.NET Core using IConfiguration (by setting ElasticApm.ServerUrls in a settings JSON file), can a similar configuration not also be done for ASP.NET Full Framework so that ELASTIC_APM_SERVER_URLS doesn't need to be set? I can't see in Elastic.Apm.AspNetFullFramework if it's possible.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.