Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach origin of a Db Query to a Span #1419

Open
lippinio opened this issue Apr 22, 2021 · 4 comments
Open

Attach origin of a Db Query to a Span #1419

lippinio opened this issue Apr 22, 2021 · 4 comments
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) type:new-feature

Comments

@lippinio
Copy link

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: dotnet/efcore#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

@tobiagru
Copy link

EfCore merged the feature to TagWith Feature ... would be cool to look into this.

@lucaspimentel lucaspimentel added area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) and removed area:integrations/adonet labels Jul 22, 2021
@lippinio
Copy link
Author

Any news on this topic?

@mlstubblefield
Copy link

+1

@lucaspimentel
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) type:new-feature
Projects
None yet
Development

No branches or pull requests

5 participants