首页 文章

Application Insights是否依赖于Azure SDK?

提问于
浏览
0

我注意到自从添加IntelliTrace以来,在Azure IaaS VM上运行时,寻找Microsoft.WindowsAzure.ServiceRunTime.dll的应用程序洞察的许多例外情况 .

//边注

值得注意的是,这些异常似乎没有在应用程序洞察门户网站中报告,除了有时我注意到某些图表中存在高例外但无法找到异常细节(直到使用IntelliTrace)....但这可能是红色的鲱鱼也许他们被TopShelf吞噬了 .

//结束边注释

自从研究我明白这个dll实际上是在Azure SDK中,而不是nuget包 .

不想为我的服务添加额外的先决条件,我更喜欢添加扩展程序集引用并复制到本地 .

版本不同,寻找2.5.0.0所以还添加了绑定重定向到2.7.0.0

无论如何,现在导致

抛出异常异常:Microsoft.WindowsAzure.ServiceRuntime.dll中的“System.IO.FileNotFoundException”(“无法加载文件或程序集'msshrtmi,版本= 2.7.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一系统找不到指定的文件 . “)System.IO.FileNotFoundException

我很谨慎,每次我修理一些东西,我都需要修复别的东西,然后别的东西......

Which led me back to my original query... 实际问题...... :-)

我还没有找到任何暗示Application Insights甚至需要安装Azure SDK的东西 . 这让我想知道异常是否真的是第一次机会异常,其中Application Insights只是询问是否安装了Azure SDK?

For reference, application insights setup:

我的应用洞察nuget包是:

<package id="Microsoft.ApplicationInsights" version="2.5.0" targetFramework="net462" />
  <package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.4.0" targetFramework="net462" />
  <package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.5.0" targetFramework="net462" />
  <package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.5.0" targetFramework="net462" />
  <package id="Microsoft.ApplicationInsights.WindowsServer" version="2.5.0" targetFramework="net462" />
  <package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.5.0" targetFramework="net462" />

我的配置包括这些遥测初始化器:

<TelemetryInitializers>
    <Add Type="Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer"/>
</TelemetryInitializers>

而这些TelemetryModules:

<TelemetryModules>
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">
        <ExcludeComponentCorrelationHttpHeadersOnDomains>

            <Add>core.windows.net</Add>
            <Add>core.chinacloudapi.cn</Add>
            <Add>core.cloudapi.de</Add>
            <Add>core.usgovcloudapi.net</Add>
            <Add>localhost</Add>
            <Add>127.0.0.1</Add>
        </ExcludeComponentCorrelationHttpHeadersOnDomains>
        <IncludeDiagnosticSourceActivities>
            <Add>Microsoft.Azure.EventHubs</Add>
            <Add>Microsoft.Azure.ServiceBus</Add>
        </IncludeDiagnosticSourceActivities>
    </Add>
    <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
    </Add>
    <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule, Microsoft.AI.WindowsServer"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule, Microsoft.AI.WindowsServer">

    </Add>
</TelemetryModules>

应用程序见解是由其他人设置的,我想知道其中一个扩展是否会导致问题,它是否适用于Windows服务 .

1 回答

  • 1

    Application Insights本身托管在Azure中,但Application Insights SDK本身不依赖于任何Azure SDK . (您不需要您的应用程序在azure中运行以将数据发送到Application Insights)

    您可能正在使用的其他内容可能具有Azure依赖项,但不具备AI .

    如果您正在查看有关.net exeptions的网站或vm指标,则该指标适用于整个框架中的抛出异常 . 如果您没有在AI门户中看到例外,那意味着它们从未由AI处理或由AI跟踪 .

相关问题