Problem Statement
- Create usage analytics reports in Power BI for data collected via Application Insights without any storage account or additional resources.
- Overcome the existing Application Insights service limitations in Power BI online, which does not provide customizations and the dataset is limited to past 30 days.
Solution
Application Insights REST API lets you query the performance and usage data that Application Insights records about your application
Configuration Steps
Application Insights
- To use the API you need to get an Application ID and access key from your Application Insights Node
- Using these attributes, data can be queried using multiple languages which support AJAX calls.
Power BI
https://api.applicationinsights.io/beta/apps/{Your APP ID}/events/$all
- Select Get Data and choose Web source where the URL should be your Endpoint you wish to query:
- In the authentication dialog provide, Select Basic and provide your APP KEY in the Username and click Connect
- In the Query Editor window click Convert Into Table, then on the column heading labelled “Value”, click the expand icon, and de-select all items except the ones required. Similarly expand all nested columns and apply your changes.
- Cast the columns into appropriate types and save the dataset.
- Now using the dataset you can create visualizations for Live reporting
Result
Note
- The SDK is still in preview mode and more features and endpoints are being added continuously
- The SDK can be used for creating custom reports also on a Web Pages or an Excel file
Service Documentation: https://dev.applicationinsights.io/