-
Notifications
You must be signed in to change notification settings - Fork 356
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
Add ability to turn on SQL query logging for Azure Functions #2548
Add ability to turn on SQL query logging for Azure Functions #2548
Comments
@krishnasingh1818 it would be great if you share a simple repro ,we will investigate further. |
More details: microsoft/ApplicationInsights-dotnet#1425 @brettsam - Do you have any more details on this? Do we have to update SDK to expose an option to enable SQL query logging? |
We need to expose a new setting that we flow through to the App Insights SDK -- |
@brettsam I have SQL command text instrumentation (in Azure Function Startup.cs) disabled like so:
Now, not only SQL command text is not logged, but SQL dependency is not logged at all. I would expect that dependency is still logged, bu only SQL query text is disabled. If I turn Here are dependencies I am using:
Any thoughts would be appreciated |
i added below code in my function startup but still its not showing sql command text. it is showing dependency in appinsight but command text is only show sql servername instead of full command text. builder.Services.ConfigureTelemetryModule((m, o) => |
@krishnasingh1818 -- doing that won't work in Functions. PR #2608 will fix this by exposing these settings in host.json. |
Microsoft.Azure.WebJobs 3.0.24 seems has fix for this issue but I don't see it available on nuget.org . within how many days should I expect it to be available on nuget.org so that I can upgrade my version. pls advise. thanks. |
@brettsam Not sure how to use this fix, so I have few questions:
Any help would be highly appreciated |
@soninaren @brettsam Can anyone please respond to @pzbyszynski ? Regards, Catalin |
@cmanoliu Please have a look here: Azure/Azure-Functions#1613 (comment) The workaround for this issue is downgrading EF & AI libraries |
Before 28 july 2020 we were able to see the sql queries in appinsight dependencies logs, but now we are only seeing server names and no sql queries are logged from azure functions consumption plan. We have other code in aks cluster and sql queries are logged for calls done for app hosted in aks.
Expected behavior
Sql queries not logged in appinsight for azure function consumption plan.
Actual behavior
Sql queries should be logged in appinsight for azure function consumption plan.
Known workarounds
i tried this link but it didnt help
microsoft/ApplicationInsights-dotnet#1425
Also adding reference to this dll brings aspnetcore things in azurefuctions project and is not making sense
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: