Sunday, November 5, 2023

How to use Azure Monitor - Application Insights to identify performance bottlenecks with dependent resources

When implementing services, we frequently rely on other services or resources. To ensure the efficiency of our solution, it's crucial to pinpoint performance bottlenecks within our system. These bottlenecks can originate from our own codebase or may stem from dependent services, such as external APIs.

You are in safe hands if you have configured Azure Monitor - Application Insights with your solution.

One valuable starting point is to explore Application Insights - Application Map. In the diagram below, you'll notice that calls to External API 2 are slower, as highlighted by the red arrow.
















We can further drill down by clicking on the red arrow (the link from our API to External API 2) to identify exactly what API endpoints are slower.












When you click on it, another blade will open, revealing a sample of the slowest calls and offering the option to delve deeper into performance issues. Let's click on the 'Investigate Performance' button.

This action will unveil an informative dashboard that provides a snapshot of performance with regards to the execution of External API 2.










As you can observe, there are certain slow API calls. If you wish to examine samples, simply click on a slow API call and select the 'Samples' button. Then, choose a specific sample to access more detailed information.







In most cases, this information should be adequate to identify performance issues and make improvements.

No comments: