Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insights not showing data for Server Response Time, Server Requests or Failed Requests

I have added Application Insights to my application.

After some time, I am correctly seeing the Browser Page Load Times, but none of the other graphs are showing any data at all.

I see this:

Missing Server Data

When I am expecting something along the lines of this:

What I am expecting

These are two ASP.NET MVC 5 applications that are in the same solution, and both are deployed to Azure.

In both cases:

  1. I have the correct javascript fragment in my razor layout (and have verified via the page source when viewing the website that it is both getting output, and that a request is sent to dc.services.visualstudio.com/v2/track);
  2. I have an ApplicationInsights.config in the web root;
  3. I am setting the correct instrumentation key during application startup, in the Application_Start() method of Global.asax.cs by way of TelemetryConfiguration.Active.InstrumentationKey = "the_key"

Please note that I DO NOT have the instrumentation key in the ApplicationInsights.config file as I am deploying the website multiple times, and are setting the instrumentation key in accordance with this advice.

I've reset everything up (following Add Application Insights SDK to monitor your ASP.NET app) but still, after at least 1/2 an hour, I am not seeing anything for Server Response Time, Server Requests or Failed Requests.

How do I fix this?

like image 718
Brendan Green Avatar asked Jul 17 '15 05:07

Brendan Green


People also ask

What is the best option to display data when it is not required to work on the data in Azure?

Workbooks. Workbooks are the visualization platform of choice for Azure.

How do I view information logs in application Insights?

View logs in Application InsightsGo to Application Insights resource in your resource group. Go to Logs under Monitoring section. Click on traces eye button to get log traces. Select Time Range and click Run.


1 Answers

Following some offline help from Alex Bulankou, I've resolved the issue.

It was difficult to pinpoint the precise combination that caused the issue, but I suspect it was due to mismatched versions of the Application Insights assemblies, a malformed ApplicationInsights.config file and something getting screwed up between adding Application Insights via the Visual Studio command and doing it manually.

The ultimate path to resolution was to:

  1. Remove all Microsoft.ApplicationInsights.* nuget packages from the project;
  2. Delete the existing ApplicationInsights.config file;
  3. Re-add the Microsoft.ApplicationInsights.Web nuget package only - it will install all the required dependencies, including a fresh ApplicationInsights.config file (that doesn't have the iKey, which is what I wanted - see below)
  4. My existing code to set the InstrumentationKey via Global.asax.cs remained unchanged

End result (I fixed this all at about 7am):

Now tracking Server Requests

like image 171
Brendan Green Avatar answered Sep 21 '22 17:09

Brendan Green