This PowerShell script streams Application Insights live metric traces to your local system and displays them in a PowerShell grid view. This is useful since the Azure Portal trace viewing experience is somewhat limited.
Warning
This script uses undocumented functionality. Exercise caution when running any scripts against your infrastructure.
To use:
- Ensure you are logged in using Azure CLI and have selected the relevant subscription.
- Run the script in a PowerShell terminal (tested only with PowerShell 7.3).
- Select the relevant Application Insights resource from the first grid view. This lists all Application Insights resources in the Azure CLI logged in subscription.
- Wait for a moment for the streaming connection to be established.
- Another grid view will open streaming application trace events with newer events at the bottom. You can use the grid view filter and search functionality to narrow down the displayed trace rows, or columns to sort the results. Filtering does not remove rows so you can try different filters to find traces you are interested in.
- Close the grid view to end the streaming connection.
An example of a grid view showing streaming events from an Azure Functions application. The grid view is filtered to display only rows containing the text "blob".