none
Live Metrics Incoming Requests Missing RRS feed

  • General discussion

  • I could use some help figuring out why Incoming Requests in Live Metrics never shows any values.

    Right now I am setting the instrumentation key in the Application_Start method  of Global.asax.cs.

    All other settings are handled in the ApplicationInsights.config file which is below.  Web Site is ASP.Net web forms 4.5 framework using a virtual directory.  Any ideas would be appreciated.

    <?xml version="1.0" encoding="utf-8"?>
    <ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
      <TelemetryModules>
        <Add Type="Microsoft.ApplicationInsights.Extensibility.AzureWebSites.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights.AzureWebSites"/>
        <Add Type="Microsoft.ApplicationInsights.Extensibility.AzureWebSites.KeyTelemetryModule, Microsoft.ApplicationInsights.AzureWebSites"/>
        <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>
      <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>
      <TelemetryInitializers>
        <Add Type="Microsoft.ApplicationInsights.Extensibility.AzureWebSites.WebAppTelemetryInitializer, Microsoft.ApplicationInsights.AzureWebSites"/>
        <Add Type="Microsoft.ApplicationInsights.Extensibility.AzureWebSites.SdkSourceTelemetryInitializer, Microsoft.ApplicationInsights.AzureWebSites"/>
        <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"/>
      </TelemetryInitializers>
      
      <AzureWebSiteExtension/>
      <TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/>
    <!-- 
        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.
      --></ApplicationInsights>
    


    


    bmukes

    Thursday, May 11, 2017 10:27 PM

All replies

  • I thought I would add a bit more detail.

    the following is in my web.config

        <httpModules>
          <remove name="ApplicationInsightsWebTracking" />
    	<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
        </httpModules>

    I am setting the instrumentationKey in code and found information online which suggested that I need to comment out

    <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
     

    in the applicationinsights.config and initialize the module in code.  I tried the following code

    				var configuration = TelemetryConfiguration.Active;
    				configuration.InstrumentationKey = instrumentationKey;
    				
    				var quickPulseModule = new QuickPulseTelemetryModule();
    				quickPulseModule.Initialize(configuration);
    
    				QuickPulseTelemetryProcessor processor = null;
    				configuration.TelemetryProcessorChainBuilder.Use((next) =>
    				{
    					processor = new QuickPulseTelemetryProcessor(next);
    					quickPulseModule.RegisterTelemetryProcessor(processor);
    					return processor;
    				});
    				configuration.TelemetryProcessorChainBuilder.Build();

    so far no change.  I also tried various other ways to initialize the QuickPulseTelemetryModule in code all had the same result.  I even tried adding an Application Insights extension to my app service and all that did was add a bin and other files to the wwwroot folder.  My application runs in the wwwroot\fpm folder.  My best guess is that this has something to do with the fact that my app service is running in a virtual directory.  I have examined this forum and stackoverflow but still no incoming requests.  


    bmukes

    Friday, May 12, 2017 8:56 PM
  • Ok the issue was that my applicationinsights.config was incorrect as was the web.config. 

    After adding applicationInsights to a 4.7.1 .net web application I compared the web.config and the applicationinsights.config.  Once I fixed them I started to see Incomming Requests.

    


    bmukes

    Friday, May 25, 2018 8:05 PM
  • I know this is an old post, but I'm facing the same problem. Would you explain if it's possible after all that time what was the difference between both files? What did you exactly fixed?
    Tuesday, October 15, 2019 10:23 AM
  • I can't say for sure what they had before, but I created a fresh ASP.NET MVC project with .NET 4.7.2 (current default), and was able to get Live Metrics Stream to work.  I'd create a new project and compare the defaults in web.config and applicationinsights.config to see what is different.

     


    Tuesday, October 22, 2019 1:58 AM
    Moderator
  • Thank you for your asnwer. I will try to dig deeper :)
    Tuesday, October 22, 2019 8:54 AM