Application Insights的Application Map不显示依赖项调用 [英] Application Insights' Application Map doesn't show dependency calls

查看:85
本文介绍了Application Insights的Application Map不显示依赖项调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已将Application Insights添加到部署到Azure Web App Service的Asp.Net 4.5.1应用程序中.它同时使用Entity Framework和SqlCommands调用数据库.

We have added Application Insights to an Asp.Net 4.5.1 application deployed to an Azure Web App Service. It calls the database both using Entity Framework and SqlCommands.

Application Insights随javascript和后端一起添加.从Fiddler跟踪的调用和Azure门户中显示的报告数据中都可以看出,JavaScript跟踪正在正常工作.

Application Insights is added both with javascript and in the backend. The javascript tracking is working, as can be seen both from calls tracked with Fiddler and the report data showing in the Azure portal.

报告中还显示了对Web服务器的请求,但应用程序映射"图表未显示从Web服务器到数据库的任何依赖项调用,也未显示任何其他依赖项.

Requests to the web server are also shown in the reports but the Application Map chart doesn't show any dependency calls from the web server to the database nor any other dependencies.

ApplicationInsights.config是您从创建新项目"获得的标准工具,但其中删除了InstrumentationKey元素.检测密钥在global.asax中设置为

The ApplicationInsights.config is the standard one that you get from "Create new project" but with the InstrumentationKey element removed. The instrumentation key is set in global.asax as

Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.Active.InstrumentationKey = applicationInsightsKey;

另外,Web配置包含

<system.web>
    <httpHandlers>
      <add path="CombineScriptsHandler.axd" verb="*" type="AjaxControlToolkit.CombineScriptsHandler, AjaxControlToolkit" />
    </httpHandlers>
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
    </httpModules>

...

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="ApplicationInsightsWebTracking" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>

如何从AI中跟踪的Web服务器获取数据库查询数据?

How can I get database query data from the web server tracked in AI?

更新

我将Web项目升级到.Net 4.6.1,开始看到一些依赖关系,但没有看到实际的SQL查询文本.为了解决这一问题,我通过Azure门户在App Service中安装了AI Status Monitor扩展.之后,我绝对看不到任何依赖项调用,并且其中不包含ApplicationInsightsExtension.log:

I upgraded the Web project to .Net 4.6.1 and started seeing some dependencies but not the actual sql query text. To remedy that I installed the AI Status Monitor extension in the App Service through the Azure portal. After that I saw absolutely no dependency calls and ApplicationInsightsExtension.log contained:

2016/9/29下午12:15:45:[详细]从D:\ home \ SiteExtensions \ Microsoft.ApplicationInsights.AzureWebSites \ Microsoft.ApplicationInsights.WebSiteManager.dll加载程序集
2016/9/29下午12:15:45:[详细]开始Application Insights的安装和配置...
2016/9/29下午12:15:46:[详细]从D:\ home \ SiteExtensions \ Microsoft.ApplicationInsights.AzureWebSites \ Microsoft.ApplicationInsights.WebSiteManager.dll加载程序集
2016/9/29下午12:15:46:[详细]正在启动Application Insights Profiler配置...
2016/9/29下午12:15:46:[详细]当前处理器体系结构:x86
2016/9/29下午12:15:46:[详细]开始从D:\ home \ SiteExtensions \ Microsoft.ApplicationInsights.AzureWebSites \ appinsights ...下载和安装'Microsoft.ApplicationInsights.Agent_x86'nuget程序包.
2016/9/29下午12:15:46 [Verbose]正在安装'Microsoft.ApplicationInsights.Agent_x86'版本'2.0.0'...
2016/9/29下午12:15:47,[详细]安装了'Microsoft.ApplicationInsights.Agent_x86'版本'2.0.0'.
2016/9/29下午12:15:47:[详细]'Microsoft.ApplicationInsights.Agent_x86'nuget软件包的下载/安装结束.
2016/9/29下午12:15:47:[详细]准备从D:\ home \ SiteExtensions \ Microsoft.ApplicationInsights.AzureWebSites \ Packages \ Microsoft.ApplicationInsights.Agent_x86.2.0.0 \ content \ RTIA \ x86复制文件到D:\ home \ SiteExtensions \ Microsoft.ApplicationInsights.AzureWebSites \ Agent
2016/9/29下午12:15:47:[详细] Microsoft.ApplicationInsights.Extensions.Base_x86.dll.Name已复制.
2016/9/29下午12:15:47:[详细] Microsoft.ApplicationInsights.ExtensionsHost_x86.dll.Name已复制.
2016/9/29下午12:15:47:[详细] Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll.Name已复制.
2016/9/29下午12:15:47:[详细] Microsoft.InstrumentationEngine.Extensions.config.Name已复制.
2016/9/29下午12:15:47:[详细] MicrosoftInstrumentationEngine_x86.dll.Name已复制.
2016/9/29下午12:15:47:[详细] Application Insights Profiler配置结束.
2016/9/29下午12:15:47:[详细]从D:\ home \ site \ wwwroot \ ApplicationInsights.config
加载配置 2016/9/29下午12:15:47:[详细]应用程序已经安装了Application Insights版本:2.1.0.0
2016/9/29下午12:15:47:[详细] Application Insights的安装和配置结束.

9/29/2016 12:15:45 PM: [Verbose] Loading assembly from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Microsoft.ApplicationInsights.WebSiteManager.dll
9/29/2016 12:15:45 PM: [Verbose] Starting Application Insights installation and configuration...
9/29/2016 12:15:46 PM: [Verbose] Loading assembly from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Microsoft.ApplicationInsights.WebSiteManager.dll
9/29/2016 12:15:46 PM: [Verbose] Starting Application Insights Profiler configuration...
9/29/2016 12:15:46 PM: [Verbose] Current processor architecture: x86
9/29/2016 12:15:46 PM: [Verbose] Starting to download/install 'Microsoft.ApplicationInsights.Agent_x86' nuget package from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\appinsights...
9/29/2016 12:15:46 PM, [Verbose] Installing 'Microsoft.ApplicationInsights.Agent_x86', version '2.0.0' ...
9/29/2016 12:15:47 PM, [Verbose] Installed 'Microsoft.ApplicationInsights.Agent_x86', version '2.0.0'.
9/29/2016 12:15:47 PM: [Verbose] End of 'Microsoft.ApplicationInsights.Agent_x86' nuget package download/install.
9/29/2016 12:15:47 PM: [Verbose] Ready to copy files from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Packages\Microsoft.ApplicationInsights.Agent_x86.2.0.0\content\RTIA\x86 to D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Agent
9/29/2016 12:15:47 PM: [Verbose] Microsoft.ApplicationInsights.Extensions.Base_x86.dll.Name was copied.
9/29/2016 12:15:47 PM: [Verbose] Microsoft.ApplicationInsights.ExtensionsHost_x86.dll.Name was copied.
9/29/2016 12:15:47 PM: [Verbose] Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll.Name was copied.
9/29/2016 12:15:47 PM: [Verbose] Microsoft.InstrumentationEngine.Extensions.config.Name was copied.
9/29/2016 12:15:47 PM: [Verbose] MicrosoftInstrumentationEngine_x86.dll.Name was copied.
9/29/2016 12:15:47 PM: [Verbose] End of Application Insights Profiler configuration.
9/29/2016 12:15:47 PM: [Verbose] Loading config from D:\home\site\wwwroot\ApplicationInsights.config
9/29/2016 12:15:47 PM: [Verbose] Application is already instrumented with Application Insights version: 2.1.0.0
9/29/2016 12:15:47 PM: [Verbose] End of Application Insights installation and configuration.

那么如何通过sql查询文本记录来获取依赖记录?

So how can I get dependency logging with sql query text logging?

如果我在applicationinsights.config文件中有遥测键,但我想通过应用程序设置以编程方式进行设置,我有种预感.

I have a hunch this would work if I had the telemetry key in the applicationinsights.config file but I want to set that programmatically from the app settings.

推荐答案

据此:要获取依赖性,您需要安装状态监视器或将应用程序升级到.NET Framework 4.6或更高版本.

To get dependencies you either need to install Status Monitor or upgrade your application to .NET framework 4.6 or later.

这篇关于Application Insights的Application Map不显示依赖项调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆