In today’s rapidly changing ecosystem, monitoring the performance of your website is essential for acquiring insight into your clients and users, as well as keeping an eye on the website’s overall performance. Thus, as a roadmap strategy, organisations across the globe are moving their applications onto the cloud at an astonishing speed and scale. The core focus is to bring the best experience to their users by leveraging the capabilities of the cloud-based solutions.

Application Insights is a web application performance management solution that allows you to handle all your website performance monitoring in Azure. The architecture is designed to make sure your website performs at its best and provides the finest user experience possible. It also includes a robust analytic tool that aids in the diagnosis of problems and the knowledge of how users interact with your web application.

However, once set up and configured, Azure Application Insight automatically detects performance anomalies. It includes powerful analytics tools to aid you to diagnose issues and understand what users do with your app. But what if you want to incorporate this Azure Application Insight data into your own custom Application Performance Management (APM) and extend the capabilities of Application Insights for different purposes?

The article aims to give a detailed description on how you can make Azure Application Insight Data available outside azure using Azure Application Insights REST API and the cost factors you should take into consideration.

The Application Insights REST API lets you query the telemetry data that Application Insights records about your application.

Following steps are involved for consuming the Application Insights data using Azure Application Insights REST API:

The Azure Application Insights REST API provides APIs for metrics, events & query to retrieve the telemetry data from Azure Application Insights.

Refer the https://dev.applicationinsights.io/ for details of available metrics, events & query.

Additionally, you can use API Explorer (applicationinsights.io) or any other standard API testing tool like Postman to test APIs.

The Azure Application Insights REST API has the below format where {app-id} and {key} are the value of AppID and API Key retrieved in step 2.

https://api.applicationinsights.io/{version}/apps/{app-id}/{operation}/[path]?[parameters]
X-API-Key:{key}

Example: Get the number of Failed requests in past 30 days.

API URL: https://api.applicationinsights.io/v1/apps/0ad06b29-d412-4a1e-xxxx-bxxxxxxxxxb/metrics/requests/failed?timespan=P30D

Cost Consideration: Azure Application Insights is part of Azure Monitor and incurs the cost in two ways as mentioned below.