I have some data in Application Insights, and I am using the Analytics view to write queries against it.
I can see that I have a trace, the CustomDimensions of which contain a property called ActivityID, which is a guid:
What I want to do is now run another query to return all traces that contain that ActivityId.
Using this as guide, I currently have the following:
union (traces
| extend ActivityId = tostring(customDimensions.ActivityId)
| project ActivityId
| where ActivityId == "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
| top 101 by timestamp desc
However, this is returning the following syntax error message:
Failed to resolve 'top' key column
What am I doing wrong? I would also appreciate and an explanation of the error message if possible.
You cannot do a
top
on projection unless you actually include the timestamp column in the projection.I did :
so this should work
and then it works. What is your complete query (I guess there is more since you are using
union
?)