Forum Discussion
Subhendu De
May 10, 2018Copper Contributor
How to extract Json in AppInsights Analytics Query
I am using following query in AppInsights Analytics traces | where operation_Id == 'f3cd894d-5b92-45d4-12bd-08d5b6695afc' | where itemType == 'trace' and timestamp > ago(24h) | top 101 by timest...
Noa Kuperberg
Microsoft
May 14, 2018Hi,
This seems to be an issue of data types.
If your customDimensions field had been a String, the extractjson method you used would have worked well. For example, see this query.
However, your customDimensions field is of type dynamic, so you should instead use the parsejson method as shown here. In your case it should be:
... | extend duration = customDimensions["1"]
As for the text search, a more efficient solution would be something like this:
... | where customDimensions["{OriginalFormat}"] contains "Time taken to process validation message with operation Id"
HTH,
Noa