2
votes

I have an Azure Application Insight component and separate Log Analytics component which pulls data from App Insight. Inside Log Analytics portal, Using Log Analytics query language (power query), I can get Application Insight Traces and Custom Events.

Custom Events in last 24H

customEvents | where timestamp >= ago(24h) | order by timestamp desc

Traces in last 24H

traces | where timestamp >= ago(24h) | order by timestamp desc

But I cannot read custom metrics I have created. I am not a query language expert. Can someone please tell me, is there a way to query that please?

1

1 Answers

0
votes

if the custom metrics were sent along with events/traces (like trackEvent(name, properties, metrics), they'd be in the customMeasurements property in the customEvents or traces tables.

customEvents | where timestamp >= ago(24h) 
| project timestamp, name, customMeasurements
| order by timestamp desc 

if the custom metrics were sent as their own "events" via trackMetric(name, value, properties), then you'd look in the customMetrics table

customMetrics | where timestamp >= ago(24h) | order by timestamp desc`