Search code examples
azure-application-insights

Why some projected columns in Application Insights queries are not shown at the desired position?


For example, consider this trivial query:

datatable(Value:int, ts:datetime) [
    10, datetime(2022-03-30),
    20, datetime(2022-03-30),
    10, datetime(2022-03-31),
    20, datetime(2022-03-31),
]
| project Value, ts

The output is:

enter image description here

Why is ts the first column, given that the project clause puts it second?


Solution

  • This appears to be a (recent) bug in the Azure Logs view's grid, which they are working on fixing. (depending on what build you can see, you can possibly already drag to re-arrange them the way you want)

    Other views that can query Log Analytics, like the Azure Workbooks UX or the Azure Data Explorer UI won't have the same issue.

    (eventually it will also be fixed in Logs view as well)

    One way to get to Azure Workbooks from inside Log Analytics view, use the "Pin To" toolbar at the top and choose "send to workbook".