App Insights - App Services - Memory Use

Query to see the memory use of the websites under an app service:-
let startTime = now()-8h;
let endTime = now();
performanceCounters
| where timestamp >= startTime and timestamp <= endTime
| where itemType == 'performanceCounter' and name == 'Private Bytes'
| where instance == '??APP_WIN32_PROC??'
| make-series memory_gb = max(value)/1073741824 on timestamp in range(startTime, endTime - -1h, 10m) by cloud_RoleInstance, cloud_RoleName
| extend machine_name = strcat(cloud_RoleInstance, ':', cloud_RoleName, ' memory (GB)')
| project timestamp, memory_gb, machine_name
| mvexpand timestamp to typeof(datetime), memory_gb to typeof(double)
| render timechart

Revision #1
Created Tue, Nov 10, 2020 9:56 AM by Simon
Updated Tue, Nov 10, 2020 9:57 AM by Simon