Search code examples
azure-application-insights

How do I include Windows 11 in App Insights events


So in App Insights - Events - Operating System we are seeing this

enter image description here

Now some of our users are on Windows 11 so my first question is where are these showing?

Undefined, Other or Windows 10?

The script is

    let usg_events = dynamic(["*"]);
let mainTable = union pageViews, customEvents, requests
    | where timestamp > ago(1d)
    | where isempty(operation_SyntheticSource)
    | extend name =replace("\n", "", name)
    | where '*' in (usg_events) or name in (usg_events)
;
let queryTable = mainTable;
let cohortedTable = queryTable
    | extend dimension = tostring(client_OS)
    | extend dimension = iif(isempty(dimension), "<undefined>", dimension)
    | summarize hll = hll(itemId) by tostring(dimension)
    | extend Events = dcount_hll(hll)
    | order by Events desc
    | serialize rank = row_number()
    | extend dimension = iff(rank > 5, 'Other', dimension)
    | summarize merged = hll_merge(hll) by tostring(dimension)
    | project ["Operating system"] = dimension, Counts = dcount_hll(merged);
cohortedTable

I am new to App Insights and still learning the deeper goodness on offer, can anyone show me how to include Windows 11 please.

Thanks in advance

Kev


Solution

  • It seems that Windows 10 and Windows 11 both sohw Windows NT 10.0 in the User-Agent so App Insights thinks that Win 11 is Win 10