Ability to see customDimensions in Azure logs under ItemType Drop Down

Copper Contributor

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
image.png

 

 
 

image.pngIs there any way to have customDimensions field there to distinguish between various ResultsPerPage ? 

 

Thank you.



1 Reply

@rangari 

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