I am looking to run a Kusto query against an Application Insights instance that will report a metric binned by a certain time amount but also grouped by a custom property. Currently, I have this working if I were to run a query that just targets a specific property, but I would like to get this to work to show me the totals over every property. Here is what I have at the moment:
customMetrics |
where name == 'MetricName' and customDimensions['Key'] == 'Value' |
summarize max(value) by bin(timestamp, 1d)
The actual aggregation function here does not matter too much.
This works perfectly, however, if I wanted to run the same thing but ignore the custom property, just running the query without that condition will not work as it will just take the maximum without correctly grouping by the custom property first. What I am trying to make work is to have all of the max()
run for all of the possible values, then Sum then up and display the results with a bin(timestamp, 1d)
. Is this possible to do?
I essentially want to run this for each day, sum up the results and display against the timestamp for that day:
customMetrics |
where name == 'MetricName'|
summarize max(value) by tostring(customDimensions['Key'])
Any help would be appreciated!