botframework - Azure Application Insights - values within objects -
i'm trying head around writing queries in azure application insights capturing interactions bot built using azure bot framework.
i have table headings such timestamp
, name
, customdimensions
, customdimensions
, within customdimensions
objects such as
{ "conversationdata": "{}", "privateconversationdata": "{\"nameform\":{\"name\":\"foo\",\"iccid\":\"12121212121212121212\"}}", "userdata": "{}", "conversationid": "878fhiee1k33j5ci", "userid": "default-user", "metrics": "92.25833" }
i can write queries select items name example customevents | name contains "activity"
but how select based on keys within objects such within privateconversationdata
above?
for example "privateconversationdata": "{\"nameform\":{\"name\":\"foo\",\"iccid\":\"12121212121212121212\"}}",
refers 1 dialog called nameform, how write query show number of times nameform used? or query included other kinds of dialog (e.g. not nameform, fooform, barform) , count of times used?
many help!
the 'customdimensions' property dynamic type , therefore can treated json document.
for example - number of times nameform used in last day:
customevents | extend conversationdata = customdimensions["privateconversationdata"] | timestamp > ago(1d) , isnotempty(conversationdata) , conversationdata contains "{\\\"nameform\\\"" | count
getting different dialogs count trickier, possible parsing customdimensions json document using parse operator:
customevents | timestamp > ago(1d) | parse customdimensions * "privateconversationdata\": \"{\\\"" dialogkind "\\\":{\\\"name\\\"" * | isnotempty(dialogkind) , isnotnull(dialogkind) | summarize count() dialogkind
you can read analytics reference learn more language.
Comments
Post a Comment