Skip to content
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

Which SDK version? #8232

Closed
iant-ee opened this issue May 8, 2018 — with docs.microsoft.com · 12 comments
Closed

Which SDK version? #8232

iant-ee opened this issue May 8, 2018 — with docs.microsoft.com · 12 comments

Comments

Copy link

iant-ee commented May 8, 2018

In Troubleshooting SQL query not shown in full, you say to "Upgrade to the latest version of the SDK."

Does this refer to upgrading to .NET 4.6+, or does it refer to App Insights? If the latter, what version of the SDK includes the fix for this? Upgrading and deploying a new SDK version is a time consuming process (it would need to be deployed as part of our next release, which may be some weeks away), so we don't want to assume that an update will fix the problem if it is actually something else.

We currently have the Microsoft.ApplicationInsights 2.3.0 nuget package installed.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@kobulloc-MSFT
Copy link
Contributor

@iant-travelopia Thank you for the feedback! We are investigating this and will get back to you shortly.

@mrbullwinkle
Copy link
Contributor

@iant-travelopia Thank you for the feedback and our apologies for the ambiguity in the doc. This refers to testing using the latest stable version of the App Insights SDK to see if it resolves your issue. As of 5/9/2018 that version would be 2.5.1:

Lastest Stable Build Screenshot

If I check the changelog for the SDK the following entries specifically call out SQL dependency monitoring related fixes:

Version 2.5.0
Fix: System.InvalidCastException for SQL Dependency

Version 2.5.0-beta1
Adds ADO SQL dependency collection for SqlClient (System.Data.SqlClient) on .NET Core versions 1.0 and 2.0.

Version 2.3.0-beta2
Add dependency collection for System.Data.SqlClient.SqlConnection.Open and System.Data.SqlClient.SqlConnection.OpenAsync by Profiler instrumentation. Dependencies are sent only for failed connections.

Version 2.2.0-beta2
SQL dependencies will have SQL error message being added to custom properties collection if application uses profiler instrumentation (either instrumented with StatusMonitor or just have StatusMonitor on the box with the app)

Version 2.2.0-beta1
ResultCode for successful Sql calls will be collected as 0 (before it was not sent)

Version 2.0.0-beta4
If multiple simultaneous calls are made on a SqlCommand object, only one dependency is recorded. The second call will be failed immediately by SqlCommand and will not be recorded as a dependency.

Does that help answer your question?

@mrbullwinkle
Copy link
Contributor

@SergeyKanzhelev & @cijothomas any additional guidance you would recommend?

@cijothomas
Copy link
Contributor

@mrbullwinkle To get full SQL queries, StatusMonitor need to be installed or if hosted in Azure Web Apps, then ApplicationInsights extension need to be installed.
There won't be any need to update from 2.3.0 of the SDK to get full sql.

@mrbullwinkle
Copy link
Contributor

@cijothomas Thank you for the clarification!

@iant-ee
Copy link
Author

iant-ee commented May 10, 2018

@mrbullwinkle The answer in the troubleshooting section is incorrect.

The bullet reading "Upgrade to the latest version of the SDK. If your .NET version is less than 4.6" should read something like "SQL queries are not collected by the SDK. Ensure the appropriate agent is installed on the host server:"

@mrbullwinkle
Copy link
Contributor

mrbullwinkle commented May 10, 2018

@iant-travelopia Thank you!

I guess my only small concern with that phrasing is someone might interpret that as Status Monitor is collecting the SQL dependency telemetry, but my understanding is that it isn't.

How about we combine your and Cijo's answer. Would this work for you?

"To see full SQL queries in dependency calls requires at least (.NET 4.6).

  • If you are monitoring an Azure Web App the ApplicationInsights site extension must be installed and enabled.
  • If you are monitoring an IIS based-application install Status Monitor on the server hosting IIS.

For detailed info on how Status Monitor works."

@iant-ee
Copy link
Author

iant-ee commented May 10, 2018

@mrbullwinkle Are you saying that to see the SQL queries you need BOTH status monitor (to collect the query) and .NET 4.6 (to log it to AppInsights as a dependency)?

Based on the table in https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/application-insights/app-insights-monitor-performance-live-website-now.md I understood that status monitor would log the dependency itself (see Run time, Dependency Diagnostics). My understanding from that page is that .NET 4.5 with the SDK won't give you any dependency information, and .NET 4.6 with the SDK will give you limited information.

I need to have a closer look at that page you linked though, because what we really want is a re-distributable/nuget component that will log the SQL queries (so that everything is controlled by committed code). We consider installing Status Monitor to be a work around to limitations of the SDK.

@mrbullwinkle
Copy link
Contributor

@SergeyKanzhelev is the author of the external blog post on the deep inner workings of Status Monitor. Sergey do you mind clarifying I don't want to create any further confusion on this one.

@mrbullwinkle
Copy link
Contributor

@iant-travelopia sorry I believe the only addition Status Monitor + .NET 4.6 vs 4.5 will get you in regard to dependency calls is return values. So no you should be fine with Status monitor + .NET 4.5 if you want to capture SQL command text. I need to go through and revise this doc further, as I am also finding parts of it confusing.

The support matrix we had previously published back when 2.1 was being released was to me a little bit clearer.

My short term update will be:

To see full SQL command text in dependency calls requires at least (.NET 4.5).
If you are monitoring an Azure Web App the ApplicationInsights extension must be installed and enabled.
If you are monitoring an IIS based-application install Status Monitor on the server hosting IIS.

@mrbullwinkle
Copy link
Contributor

Changes to this doc to address this question have been merged and will go-live tomorrow at 10 am.

@mrbullwinkle
Copy link
Contributor

#please-close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants