Feb 05 2020
11:46 AM
- last edited on
Apr 08 2022
10:17 AM
by
TechCommunityAP
Feb 05 2020
11:46 AM
- last edited on
Apr 08 2022
10:17 AM
by
TechCommunityAP
Hi,
I am using Custom Events to track some user activity.
For Example- In our Application every user can set a preference to have certain number of Search results per page. Options being (25,50,75,100). Here our aim is to capture what is the most common Results Per page Number. To capture this I set up a custom event in my JavaScript like -
var resultsPerPage = getResultsPerPage();
appInsights.trackEvent("Results Per Page", {resultsPerPage : resultsPerPage})
App Insights captures this information all good, however I want to break down this information in Graphically using Azure Logs PieChart. I am trying that, but I am not able to find customDimensions field under ItemType Drop Down. See below image
Is there any way to have customDimensions field there to distinguish between various ResultsPerPage ?
Thank you.
Feb 06 2020 05:45 AM
You probably need to get that column as an integer, very rough example (using a datatable as a fake input):
datatable (TimeGenerated:datetime, ItemType:string, customDimensions:string)
[datetime(1910-06-11), "customEvent", '{"resultsPerPage":"25"}']
| project TimeGenerated, ItemType, customDimensions
| extend rsltsValue =split(customDimensions,":").[1]
| project TimeGenerated , ItemType , val = toint(trim(@"[^\w]+",tostring(rsltsValue)))
Go to Log Analytics and run query