Application Insights REST API integration with Power BI

Problem Statement

  1. Create usage analytics reports in Power BI for data collected via Application Insights without any storage account or additional resources.
  2. 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
  1. To use the API you need to get an Application ID and access key from your Application Insights Node
  2. Using these attributes, data can be queried using multiple languages which support AJAX calls. Application Insights
Power BI
https://api.applicationinsights.io/beta/apps/{Your APP ID}/events/$all
  1. Select Get Data and choose Web source where the URL should be your Endpoint you wish to query: Get Data
  2. In the authentication dialog provide, Select Basic and provide your APP KEY in the Username and click Connect Authentication
  3. 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.
  4. Cast the columns into appropriate types and save the dataset.
  5. Now using the dataset you can create visualizations for Live reporting

Result

Result

Note

  1. The SDK is still in preview mode and more features and endpoints are being added continuously
  2. The SDK can be used for creating custom reports also on a Web Pages or an Excel file

Service Documentation: https://dev.applicationinsights.io/