You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
When I've used Application Insights with ASP.NET applications, the SQL dependency logs include the actual SQL command/query that was sent to SQL Server. When using this package for a WCF service I see SQL dependencies being logged, but the command property only contains the server and database my app is hitting and not the actual SQL command/query. I get timing and frequency data, but that information isn't helpful without knowing what the source was. Is there a way to enable this or is this something that needs developed for this package?
The text was updated successfully, but these errors were encountered:
WCF nuget package is responsible only for request and exception collection which is specific for WCF. Dependency collection is done the same way as in Web and comes with Dependency nuget package. Command name collection depends on whether you use StatusMonitor or not.
Some details here: microsoft/ApplicationInsights-Announcements#9
My WCF service does reference Microsoft.ApplicationInsights.DependencyCollector and it targets .NET 4.6.1, so I thought the CommandText should be logged automatically from my experience in ASP.NET applications. I thought my issue had something to do with using this package and being a WCF service but it must be something else. I'll do some more research and direct further questions to the announcement thread you referenced for the Microsoft.ApplicationInsights.DependencyCollector package.
Wcf nuget package depends on Application Insights Windows Server nuget. Application Insights Windows Server depends on Microsoft.ApplicationInsights.DependencyCollector . The last one automatically collects dependencies for 4.6. But command text is available only if you also have StatusMonitor. You do not have to onboard your application using StatusMonitor. You just need to
host your application in IIS (we need the process to be w3wp.exe)
install status monitor on the same box with your application
restart IIS after StatusMonitor is installed. (StatusMonitor does not have to be started after that)
StatusMonitor brings in a profiler so we can collect more information. Without it collection is based on .Net framework instrumentation which does not give us command text.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I've used Application Insights with ASP.NET applications, the SQL dependency logs include the actual SQL command/query that was sent to SQL Server. When using this package for a WCF service I see SQL dependencies being logged, but the command property only contains the server and database my app is hitting and not the actual SQL command/query. I get timing and frequency data, but that information isn't helpful without knowing what the source was. Is there a way to enable this or is this something that needs developed for this package?
The text was updated successfully, but these errors were encountered: