I have a Blazor server application with 2 databases it calls via Entity Frameworks. One is the Identity Library DB. The other is my application DB.
When I go in to Application Insights and:
It now under Dependency Name lists the 2 databases.
Now over on the right it has Select a sample dependency
If I click on one from the Identity Library database, on the right it has:
But if I click on one from the application database, then over on the right, for the command, it has the following:
louishowe.database.windows.net,1433 | Application_2024_04_25
That's the server & database. But no query. Why not? What do I have to do so Application Insights can show me the actual queries?
Full SQLQuery is not collected by default, and requires explicit opt-in. The following doc has instructions on how to do that: https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies#advanced-sql-tracking-to-get-full-sql-query