I would like to sort the results of my query according to customDimension.MyCustomProperty
which is present in all entities and is a number. How can I do that?
In the Azure Portal, navigate to the Application Insights resource, and click Log Analytics. Log queries help you to fully leverage the value of the data collected in Azure Monitor Logs. Query your custom events by entering “customEvents” in the prompt and click Run.
Because the workspace-based Application Insights enhances your monitoring experience, we retire the classic Application Insights on 29 February 2024.
Application Insights telemetry model defines a way to correlate telemetry to the operation of which it's a part. For example, a request can make a SQL Database calls and recorded diagnostics info. You can set the correlation context for those telemetry items that tie it back to the request telemetry.
What I would suggest is first extend
ing your result set with your customDimension. Then you'll have to cast your new column to either a string, an int or a double. The reason for this is that customDimensions
is considered a dynamic column
A quick example:
traces | extend sortKey = toint(customDimensions.MyCustomProperty) | order by sortKey asc
The casting options are:
If you want to remove the sorting key after the actual sort, you can project-away
the new column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With