1
votes

I have data in azure Insights saved in custom events formats. Now I need to create a dashboard page in my website that will pull data from insights and will show graphs on that data. Questions is that how I can filter data from the customEvents based on data saved there. like based on custom events or custom data.

Provide me any resource from where I can see that how $filer, $search,$query works? I am here https://dev.applicationinsights.io/quickstart but not looks like enough.

I tried to add filter like startswith(customEvent/name, 'BotMessageReceived') in https://dev.applicationinsights.io/apiexplorer/events but it not working. is says "Something went wrong while running the query", I have customEvents which name start with BotMessageReceived

Thanks Dalvir

1
please use analycis query and the api you metioned in your question, some thing like https://api.applicationinsights.io/v1/apps/Your_application_id/query?query=events | where timestamp >ago(5h)Ivan Yang

1 Answers

3
votes

update: There is no like operator, if you wanna use timestamp as a filter, you should use one of the three methods below:

    customEvents 
    | where timestamp >= datetime('2018-11-23T00:00:00.000') and timestamp <= 
datetime('2018-11-23T23:59:00.000')


    customEvents
    | where tostring(timestamp) contains "2018-12-11"


    customEvents
    | where timestamp between(datetime('2018-11-23T00:00:00.000') .. 
datetime('2018-11-23T23:59:00.000') ) 

Please use this:

customEvents
| where name startswith "BotMessageReceived"

And if you use the api you metioned above, you can use:

    https://api.applicationinsights.io/v1/apps/Your_application_id/query?
query=customEvents | where name startswith "BotMessageReceived"

It works at my side.