Azure application insights 应用程序洞察:一些指标未通过,不确定如何响应错误消息

Azure application insights 应用程序洞察:一些指标未通过,不确定如何响应错误消息,azure-application-insights,Azure Application Insights,我不熟悉应用程序洞察 此票据中的详细信息与特定API有关,该API使用C#编写,带有.NET Framework(非核心),在Windows Server 2012 R2数据中心虚拟机上的IIS中运行 我们为这个API提供了很多ApplicationInsights指标,包括一些我们自己编写的非常有用的自定义遥测 但是一些关键的事情,比如每秒的请求数和每秒失败的请求数都没有通过 我做了一些挖掘,在Application Insights日志中找到了一些与特定API相关的跟踪信息,但我不确定如何处

我不熟悉应用程序洞察

此票据中的详细信息与特定API有关,该API使用C#编写,带有.NET Framework(非核心),在Windows Server 2012 R2数据中心虚拟机上的IIS中运行

我们为这个API提供了很多ApplicationInsights指标,包括一些我们自己编写的非常有用的自定义遥测

但是一些关键的事情,比如每秒的请求数和每秒失败的请求数都没有通过

我做了一些挖掘,在Application Insights日志中找到了一些与特定API相关的跟踪信息,但我不确定如何处理这些信息

这里有一个例子:

AI:收集3个已配置的性能计数器时出错。请检查配置

计数器\ASP.NET应用程序(?APP\U W3SVC\U PROC???)请求/秒:无法执行性能计数器的第一次读取。请确保它存在。类别:ASP.NET应用程序,计数器:请求/秒,实例\u LM\u W3SVC\u 4\u根

计数器\ASP.NET应用程序(?APP\U W3SVC\U PROC???)请求执行时间:未能执行性能计数器的第一次读取。请确保它存在。类别:ASP.NET应用程序,计数器:请求执行时间,实例\u LM\u W3SVC\u 4\u根

计数器\ASP.NET应用程序(?APP\U W3SVC\U PROC???)应用程序队列中的请求:未能执行性能计数器的第一次读取。请确保它存在。类别:ASP.NET应用程序,计数器:应用程序队列中的请求,实例_LM_W3SVC_4_根

另一个例子:

AI:ApplicationInsights配置文件加载失败。未找到类型“Microsoft.ApplicationInsights.StatusMonitor.SdkSourceTelemetryInitializer,Microsoft.AI.StatusMonitor”。已跳过类型加载。监测工作将继续进行

以下是相关网站的ApplicationInsights.config文件:

<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
  <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" />
    <Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web">
      <!-- Extended list of bots:
            search|spider|crawl|Bot|Monitor|BrowserMob|BingPreview|PagePeeker|WebThumb|URL2PNG|ZooShot|GomezA|Google SketchUp|Read Later|KTXN|KHTE|Keynote|Pingdom|AlwaysOn|zao|borg|oegp|silk|Xenu|zeal|NING|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|Java|JNLP|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|vortex|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|voyager|archiver|Icarus6j|mogimogi|Netvibes|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|wsr-agent|http client|Python-urllib|AppEngine-Google|semanticdiscovery|facebookexternalhit|web/snippet|Google-HTTP-Java-Client-->
      <Filters>search|spider|crawl|Bot|Monitor|AlwaysOn</Filters>
    </Add>
    <Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.OperationNameTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.UserTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.AuthenticatedUserIdTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.AccountIdTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.SessionTelemetryInitializer, Microsoft.AI.Web" />
    <Add Type="Microsoft.ApplicationInsights.StatusMonitor.SdkSourceTelemetryInitializer, Microsoft.AI.StatusMonitor" />
  </TelemetryInitializers>
  <TelemetryModules>
    <Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">
      <ExcludeComponentCorrelationHttpHeadersOnDomains>
        <!-- 
        Requests to the following hostnames will not be modified by adding correlation headers. 
        This is only applicable if Profiler is installed via either StatusMonitor or Azure Extension.
        Add entries here to exclude additional hostnames.
        NOTE: this configuration will be lost upon NuGet upgrade.
        -->
        <Add>core.windows.net</Add>
        <Add>core.chinacloudapi.cn</Add>
        <Add>core.cloudapi.de</Add>
        <Add>core.usgovcloudapi.net</Add>
      </ExcludeComponentCorrelationHttpHeadersOnDomains>
    </Add>
    <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
      <!--
      Use the following syntax here to collect additional performance counters:

      <Counters>
        <Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
        ...
      </Counters>

      PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName

      NOTE: performance counters configuration will be lost upon NuGet upgrade.

      The following placeholders are supported as InstanceName:
        ??APP_WIN32_PROC?? - instance name of the application process  for Win32 counters.
        ??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
        ??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
      -->
    </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 Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
      <Handlers>
        <!-- 
        Add entries here to filter out additional handlers: 

        NOTE: handler configuration will be lost upon NuGet upgrade.
        -->
        <Add>System.Web.Handlers.TransferRequestHandler</Add>
        <Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
        <Add>System.Web.StaticFileHandler</Add>
        <Add>System.Web.Handlers.AssemblyResourceLoader</Add>
        <Add>System.Web.Optimization.BundleHandler</Add>
        <Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
        <Add>System.Web.Handlers.TraceHandler</Add>
        <Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
        <Add>System.Web.HttpDebugHandler</Add>
      </Handlers>
    </Add>
    <Add Type="Microsoft.ApplicationInsights.Web.ExceptionTrackingTelemetryModule, Microsoft.AI.Web" />
  </TelemetryModules>
  <TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel" />
  <TelemetryProcessors>
    <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector" />
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
      <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
    </Add>
  </TelemetryProcessors>
  <!-- 
    Learn more about Application Insights configuration with ApplicationInsights.config here: 
    http://go.microsoft.com/fwlink/?LinkID=513840

    Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
  -->
  <InstrumentationKey>**removed**</InstrumentationKey>
  <ResourceID>**removed**</ResourceID>
  <StatusMonitor>2.3.0</StatusMonitor>
</ApplicationInsights>

搜索|蜘蛛|爬行|机器人|监视器| AlwaysOn
core.windows.net
core.chinacloudapi.cn
core.cloudapi.de
core.usgovcloudapi.net
System.Web.Handlers.TransferRequestHandler
Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler
System.Web.StaticFileHandler
System.Web.Handlers.AssemblyResourceLoader
System.Web.Optimization.BundleHandler
System.Web.Script.Services.ScriptHandlerFactory
System.Web.Handlers.TraceHandler
System.Web.Services.Discovery.DiscoveryRequestHandler
System.Web.HttpDebugHandler
5.
**除去**
**除去**
2.3.0
主机正在作为Azure VM的一部分运行Windows Server 202 R2数据中心

因为我是新手,我真的不知道从哪里开始。我试着用谷歌搜索错误信息,但我没有找到多少对我目前的情况有用的信息


非常感谢任何指向正确方向的指针。

您使用的SDK版本是什么?您是否将application insights SDK添加到应用程序本身,或者使用状态监视器在运行时为应用程序添加工具

关于PerfCounters的错误表示SDK在尝试收集提到的计数器时遇到错误。您是否看到其他计数器,如进程CPU、内存等?如果是,则问题仅与Asp.Net相关的计数器有关。您是否可以使用perfmon之类的工具来验证机器中是否存在这些计数器

您可以从Ai.Config中删除以下行,以消除有关StatusMonitor initialier的错误-我不确定它的作用,但它无法解释您丢失某些数据的原因

请分享更多信息-sdk版本、web.config、如何登录等,我会尽力提供更多帮助