Hi @erjohnson,
I went through the comments here - couple of comments:
-
On the issue on .NET Framework that no span is created for outgoing HTTP requests:
We had a similar issue here and the problem was that the application referenced an older
System.Diagnostics.DiagnosticSource
. TheHttpDiagnosticsSubscriber
just subscribes to DiagnosticSource events, but that old version does not send the necessary events. I suspect that by addingMicrosoft.ApplicationInsights.Web
you pulled a newer version of that package and that's why it started to work. TheMicrosoft.ApplicationInsights.Web
itself is definitely not used by the Elastic agent. I may be wrong on the root cause here - you can simply double check by just updatingSystem.Diagnostics.DiagnosticSource
as described in the other thread and see if that helps. -
About the difference between the Core and the non-Core packages:
This part of the doc describes what these packages do. For .NET Core the
Elastic.Apm.NetCoreAll
turns on everything that can be monitored on .NET Core, so if you use that, that'll automatically turn on theHttpDiagnosticsSubscriber
and other things. TheElastic.Apm.AspNetCore
package only turns on ASP.NET Core incoming monitoring. The idea here is that if you just want to turn on the agent use theElastic.Apm.NetCoreAll
- that'll turn on everything, but it may pull in some references that are not even needed (e.g. it'll try to turn on EF Core monitoring and and pull in some references no matter if you use EF Core or not). If this is an issue for you and want to minimize dependencies then you can use specific packages and turn on whatever you need withAgent.Subscribe
manually.
We plan to have a similar "turn on everything for me, I don't care about references" type of package for .NET Framework later as well. Currently the IIS module fromElastic.Apm.AspNetFullFramework
turns on outgoing HTTP monitoring as you pointed out.