I just watched the video https://www.youtube.com/watch?v=TV1u6UoBRwk and saw the section on End to End transactions. I've used that to track down a SQL query that is taking 1.8 mins.
The query is truncated (probably because EF is generating a super long query).
Is there any way to get the full query from Application Insights?
SQL Commands
in our deployed App Service
=> Application Insights
.Program.cs
file, if it is .NET Core
Applications.builder.Services.ConfigureTelemetryModule<DependencyTrackingTelemetryModule>((module, o) => { module.EnableSqlCommandTextInstrumentation = true; });
.NET Framework
Application, add the below line in TelemetryModules
section in ApplicationInsights.config
file (which is generated when we add Application Insights in Visual Studio.<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">,
<EnableSqlCommandTextInstrumentation>true</EnableSqlCommandTextInstrumentation>
</Add>