Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insights missing browser info

I added Application Insights to my web project using Application Insights button in Visual Studio 2017. After that I've added JavaScript code to View\Shared\_Layout.cshtml as described here

After a week of monitoring I found that there is missing some information about client browser, OS, etc.

The following query returns only client_Type with PC value (but should also Mobile)

requests
 | project client_Type, client_Browser, client_Model, client_OS

Why it is empty? What I missed? Should I add some configuration to store that info?

like image 789
Robert N. Dean Avatar asked Mar 13 '26 06:03

Robert N. Dean


1 Answers

requests might not have browser info. that comes from the server side, so i want to say it gets everything from the UserAgent header of inbound requests.

however, the javascript code in your layout.cshtml enables PageView telemetry, which collects more information from the browser.

things to do:

1) make sure your backend (whatever is sending requests) is using the same ikey as whatever you have in your javascript snippet, to make sure you looking at the same data for both things

2) look at what's in both tables and see if it is different:

union requests, pageViews
| where timestamp > ago(14d)
| summarize count() by itemType, client_Browser
| render barchart 

i bet you get a bar chart that has requests with one giant bar for one browser (empty), and a different bar for pageViews that has lots of browsers?

like image 116
John Gardner Avatar answered Mar 14 '26 18:03

John Gardner