No SQL tracing when using dapper in .Net 5

APM Agent language and version:
C# 1.6.1

<PackageReference Include="Elastic.Apm.AspNetCore" Version="1.6.1" />
<PackageReference Include="Elastic.Apm.NetCoreAll" Version="1.6.1" />
<PackageReference Include="Elastic.Apm.SqlClient" Version="1.6.1" />

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Nuget

Hi!

We have a Web API which uses Dapper for data access. However we get no tracing for the SQL call. We are running .Net 5.0

In the Configure method in Startup.cs

    app.UseElasticApm(Configuration, new SqlClientDiagnosticSubscriber(), new HttpDiagnosticsSubscriber());

The code which calls the database looks like this

    using IDbConnection db =  new SqlConnection(_configuration.InsuranceConnection());

    const string getAllaArbetsgivareIdnProcName = "[dbo].[Stored_Procedure]";

    var allaArbetsgivareId = await db.QueryAsync<Guid>(getAllaArbetsgivareIdnProcName, null, commandType: CommandType.StoredProcedure);

And it's using

using Microsoft.Data.SqlClient;

Logs from the application

How it looks in Kibana

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.