For ASP.NET Core (and likely other platforms), Application Insights by default tracks all queries to Azure SQL Database (and likely other platforms) as dependency operations. For each query, it records the query string, something like this:
SELECT [b].[Foo] FROM [Bar] AS [b] WHERE [b].[Id] = @id
However, it doesn't record the value of @id
. How do I make it record the values of the query parameters?