Ability to see customDimensions in Azure logs under ItemType Drop Down

%3CLINGO-SUB%20id%3D%22lingo-sub-1153533%22%20slang%3D%22en-US%22%3EAbility%20to%20see%20customDimensions%20in%20Azure%20logs%20under%20ItemType%20Drop%20Down%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1153533%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Custom%20Events%20to%20track%20some%20user%20activity.%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20Example-%20In%20our%20Application%20every%20user%20can%20set%20a%20preference%20to%20have%20certain%20number%20of%20Search%20results%20per%20page.%20Options%20being%20(25%2C50%2C75%2C100).%20Here%20our%20aim%20is%20to%20capture%20what%20is%20the%20most%20common%20Results%20Per%20page%20Number.%20To%20capture%20this%20I%20set%20up%20a%20custom%20event%20in%20my%20JavaScript%20like%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3Evar%20resultsPerPage%20%3D%20getResultsPerPage()%3B%20%0AappInsights.trackEvent(%22Results%20Per%20Page%22%2C%20%7BresultsPerPage%20%3A%20resultsPerPage%7D)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApp%20Insights%20captures%20this%20information%20all%20good%2C%20however%20I%20want%20to%20break%20down%20this%20information%20in%20Graphically%20using%20Azure%20Logs%20PieChart.%20I%20am%20trying%20that%2C%20but%20I%20am%20not%20able%20to%20find%20customDimensions%20field%20under%26nbsp%3BItemType%20Drop%20Down.%20See%20below%20image%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F169220i95FFEA380E0C7573%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F169218iEFF1159C1688BC7E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3EIs%20there%20any%20way%20to%20have%20customDimensions%20field%20there%20to%20distinguish%20between%20various%20ResultsPerPage%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1153533%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1155580%22%20slang%3D%22en-US%22%3ERe%3A%20Ability%20to%20see%20customDimensions%20in%20Azure%20logs%20under%20ItemType%20Drop%20Down%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1155580%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F546382%22%20target%3D%22_blank%22%3E%40rangari%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20probably%20need%20to%20get%20that%20column%20as%20an%20integer%2C%20%3CSTRONG%3Every%3C%2FSTRONG%3E%20rough%20example%20(using%20a%20datatable%20as%20a%20fake%20input)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Edatatable%20(TimeGenerated%3Adatetime%2C%20ItemType%3Astring%2C%20customDimensions%3Astring)%0A%20%20%20%20%5Bdatetime(1910-06-11)%2C%20%22customEvent%22%2C%20'%7B%22resultsPerPage%22%3A%2225%22%7D'%5D%0A%7C%20project%20TimeGenerated%2C%20ItemType%2C%20customDimensions%0A%7C%20extend%20rsltsValue%20%3Dsplit(customDimensions%2C%22%3A%22).%5B1%5D%0A%7C%20project%20TimeGenerated%20%2C%20ItemType%20%2C%20val%20%3D%20%20toint(trim(%40%22%5B%5E%5Cw%5D%2B%22%2Ctostring(rsltsValue)))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fms.portal.azure.com%23%4072f988bf-86f1-41af-91ab-2d7cd011db47%2Fblade%2FMicrosoft_Azure_Monitoring_Logs%2FDemoLogsBlade%2FresourceId%2F%252FDemo%2Fsource%2FLogsBlade.AnalyticsShareLinkToQuery%2Fq%2FH4sIAAAAAAAAA3VPS0sDQQy%25252BL%25252FQ%25252FhLl0BqfSERRcKPSgiLceipe1wrgb6pR5LDPZqqj%25252F3ZQqi4oJhJDke6SzxPnoEeTaBbzBiNkSdnXHlXii4ZYwrF97rAtlF7ca2qFQCle8jMWlWL4WalIBR%25252FONlObSzGfzi5kxSoM4oq73GElomL6JjGXwVFaYV3aLohZn5%25252BJjuplU79DntMOW4Iel0clfCwcQvhDGDnJh0jvrB4RF6b0j%25252BftYs5Y6bcz%25252FUjBqcbu3HhYAlFwkya8GuRTNw%25252F3z5kRoSsfn5SirlDoQZzaDGdrkhxDbJ5sJqk%25252BlVsXUbgEAAA%25253D%25253D%2Ftimespan%2FP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20run%20query%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorClive%20Watson_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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