How to use Distributed tracing in with elastic apm in non .net core application?

The reason for SQL queries not being captured is because Elastic APM .NET agent doesn't have support for automatically capturing LINQ to SQL queries. As you can see in Supported Technologies section of the documentation the only data access technology for which .NET agent currently supports automatic instrumentation is Entity Framework (EF) Core.

I didn't see that this is the actual reason for SQL queries not being captured - I focused on distributed tracing aspect of the question.

I opened an issue to add automatic instrumentation for LINQ to SQL. Although it's quite dated technology so I'm not sure if we will get to it in the near future. Of course community contributions are very welcome in case you would like to give a try. I added a few potential directions for implementation in the issue's description.