No data is collected for a .Net application

You may not get data from open telemetery running a .Net application because of a dependency on an old version of System.Diagnostics.DiagnosticSource. OpenTelemetry requires System.Diagnostics.DiagnosticSource 8.0.0. For example, you may have a .Net 6.0 application that uses Microsoft.Data.SqlClient driver which transitivly depends on System.Diagnostics.DiagnosticSource 6.0.1 - this will create a conflict with Open Telemetry and the agent won’t send data.

To check if you have such a dependency go to the folder containing the published application and look for System.Diagnostics.* dll files.

To resove the issue, upgrade your application to .Net 8 or review the dependencies and see if you can remove the dependency on System.Diagnostics.DiagnosticSource.