APM Server version: 1.5.1
APM Agent language and version: dotnet
We started working with APM agent for .net core (Elastic.Apm.NetCoreAll) and it works nice but I have couple of questions:
Why is everything static? It feels really awkward to use Singletons inside .net core app in 2020 - especially since .net core was build on top of IoC/DI.
It also makes it super hard to unit test code that uses
Agent.Tracer.CaptureSpan (it is almost impossible to be honest - we have to refactor code to use the hack Mock an APM instance).
How will that singleton behave if we are using the APM tracing not only for http requests but also for rabbitmq events - since everything is a singleton is there a chance that by accessing agent singleton instance while we have both rabbitmq and http in progress might be problematic?
Thanks in advance! And keep up the great work