2
votes

I'm using Azure Application Insights. After some config steps followed by official documents, I found my application insights works fine on my local build. The data of Request, Exception, Dependency and Custom Event all appear in azure portal.

However, as soon as I deploy it to Azure web app, I cannot see any Application Insights data in azure portal.

I've verified that the Application Insights Dlls and Microsoft.Diagnostics.Tracing.EventSource.dll are both copied to azure according to the "No (server) data since I published the app to my server" part of this article: https://azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-troubleshoot-no-data/#q03

Some other strange things is, when I remote debug my azure web app, I found all TelemetryClient appears "not configured", however My Instrumentation key write correctly in ApplicationInsights.config

One more thing is, when I change code like this:

var client = new TelemetryClient();
client.Context.InstrumentationKey = "The Key";
client.TrackEvent("TestEvent");

The Custom Events comes out in Azure portal. But other data like Request, Exception, Dependencies are not recorded in portal automatically.

What's wrong with my Application?

2

2 Answers

1
votes

Under the help of an azure support engineer, the problem has been solved.

The cause is that in App Setting in the azure portal, there is a config sets "MOBILESERVICESDOTNET_EXTENSION_VERSION" = 1.0.478

After delete this config, everything works fine.

But I'm still not sure the root cause of that. Why this config can cause so much trouble?

0
votes

It sounds like you are recording telemetry where you have control over the TelemetryClient - like in your code sample above.

With that in mind, there are a few things for you to check:

  • The applicationinsights.config is configured with your instrumentation key.
  • The applicationinsights.config is being deployed to WebApps
  • All the necessary telemetry modules are in your web.config

Since you're receiving telemetry locally, I would say this is as simple as you not deploying the applicationinsights.config file.