0
votes

We monitor our asp.net MVC web application using application insights. We used to just do server side logging, but recently I tried to also start logging client side data as explained here: https://docs.microsoft.com/en-US/azure/application-insights/app-insights-javascript

I added the script to the _layout.cshtml file and when I run the app and check if the object appInsights exists in the chrome dev tools it's up and running and it contains the right application key, but it's not logging any data. All blades in Azure's App Insights report that there's no data.

Any clues?

Regards, Ted

2
What do you mean by "it's all good" when it is not logging any data? - jegtugado
That was vague indeed, changed the text. better? - TedOnTheNet
Maybe the traffic gets blocked from the (connection of the) client? Add blockers might also interfere when loading the script. And because of performance, AppInsights might store some information locally before sending it to AppInsights. This can be several minutes. Did you select the right Time Period in AppInsights? And where is the application hosted? - rickvdbosch
The application is hosted in Azure as a Web App service. There are no firewall rules and I've tried disabling our custom ip blocker but didn't solve the problem. - TedOnTheNet

2 Answers

1
votes

Had the similar problem. In my case it was resolved by putting the quotation marks around an instrumentation key in JavaScript snippet.

Please have a look at this troubleshooting article for some other scenarios: https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript-sdk-load-failure

0
votes

Please check telemetry being sent to the application insights endpoint dc.services.visualstudio.com/v2/track (look for any outgoing requests with "url" property for pageviews and in that telemetry item, please confirm ikey) in fiddler. Also, if you are running this through visual studio debugger, we filter out traffic from browser links, so that telemetry will not be sent.