dd-trace-dotnet
dd-trace-dotnet copied to clipboard
Attach origin of a Db Query to a Span
For a given Trace its really hard to find out where the query is located in the Code. Its even harder to find when an OR Mapper is used like EF Core
So for spans with a Database Query it would be very helpful to see the origin of the query. We imagine something like Filename and Line Number in the Code as Tags on Database Queries. A similar feature is described here for EF Core: https://github.com/dotnet/efcore/issues/14176
For EF Core there is a Feature thats called TagWith() thats add a given Comment to a Query. But as i know Comments are dropped by datadog. https://docs.microsoft.com/en-us/ef/core/querying/tags
EfCore merged the feature to TagWith Feature ... would be cool to look into this.
Any news on this topic?
+1
The Continuous Profiler for .NET just reached General Availability (GA) with yesterday's 2.14.0 release. The Continuous Profiler can help you find where your database queries are coming from since it can track entire stack traces and connect those to your APM traces. See the section "Connect traces to profiling data" in the documentation linked above.
Another related Datadog feature is the Source Code Integration, which lets Datadog show snippets of your source code inline with APM traces and other products. However, today source code integration only supports Go and JVM languages, not .NET yet.