We want to implement Elastic APM only for some environments so we need a method to disable the agent.
For dotnet core it's pretty straight-forward since you can skip calling app.UseAllElasticApm(Configuration), but for .NET Framework 4.8 windows services I couldn't find a way to disable it, since for every Elastic.Apm.Agent.Tracer.StartTransaction() it tries to connect to Elastic APM.
Does anybody have an idea on how this can be done?
Thanks,
Radu